11498 - Division of Nlogonia

 11498 - Division of Nlogonia

#include<bits/stdc++.h>

using namespace std;

int main()
{
    int n,N,M,x,y;
    while(scanf("%d",&n)&&n)
    {
        cin>>N>>M;
        while(n--)
        {
            cin>>x>>y;
            x-=N;
            y-=M;
            if(x*y==0)
                printf("divisa");
            else if(x>0&&y<0)
                printf("SE");
            else if(x>0&&y>0)
                printf("NE");
            else if(x<0&&y>0)
                printf("NO");
            else
                printf("SO");
            cout<<endl;
        }
    }


    return 0;

}

SHARE

Amit Ghosh

    Blogger Comment
    Facebook Comment

0 comments :

Post a Comment