#include<bits/stdc++.h>
#define i64 long long
#define mx(a,b,c) max(a,max(b,c))
#define mn(a,b,c) min(a,min(b,c))
#define eef else if
#define ff(i,s,e) for(int i=(s); i<e; i++)
#define ff2(i,s,e) for(int i=(s); i>=e; i--)
#define sf scanf
#define pf printf
#define dbug(x) cout<<"x = "<<x<<endl
using namespace std;
int main()
{
int cse=0,cnt=0,flg=0;
int t , x , y;
while(cin>>t){
if(t==0)
break;
else{
cin>>x>>y;
int rx,ry;
while(t--){
cin>>rx>>ry;
if(x==rx||y==ry)
cout<<"divisa\n";
else if(rx<x&&ry>y)
cout<<"NO\n";
else if(rx<x&&ry<y)
cout<<"SO\n";
else if(rx>x&&ry<y)
cout<<"SE\n";
else if(rx>x&&ry>y)
cout<<"NE\n";
}
}
}
return 0;
}
#define i64 long long
#define mx(a,b,c) max(a,max(b,c))
#define mn(a,b,c) min(a,min(b,c))
#define eef else if
#define ff(i,s,e) for(int i=(s); i<e; i++)
#define ff2(i,s,e) for(int i=(s); i>=e; i--)
#define sf scanf
#define pf printf
#define dbug(x) cout<<"x = "<<x<<endl
using namespace std;
int main()
{
int cse=0,cnt=0,flg=0;
int t , x , y;
while(cin>>t){
if(t==0)
break;
else{
cin>>x>>y;
int rx,ry;
while(t--){
cin>>rx>>ry;
if(x==rx||y==ry)
cout<<"divisa\n";
else if(rx<x&&ry>y)
cout<<"NO\n";
else if(rx<x&&ry<y)
cout<<"SO\n";
else if(rx>x&&ry<y)
cout<<"SE\n";
else if(rx>x&&ry>y)
cout<<"NE\n";
}
}
}
return 0;
}
No comments:
Post a Comment