import java.util.Scanner;
//11498
public class DivisionOfNlogonia {
static int noOfQueries;
static int divPtX;
static int divPtY;
static int ptX;
static int ptY;
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
while((noOfQueries = scanner.nextInt()) != 0) {
divPtX = scanner.nextInt();
divPtY = scanner.nextInt();
while((noOfQueries--) != 0) {
ptX = scanner.nextInt();
ptY = scanner.nextInt();
doWork();
}
}
}
public static void doWork() {
if(ptX == divPtX) {
System.out.println("divisa");
return;
}
if(ptY == divPtY) {
System.out.println("divisa");
return;
}
if(ptY > divPtY) {
if(ptX > divPtX) System.out.println("NE");
else System.out.println("NO");
return;
}
if(ptX > divPtX) System.out.println("SE");
else System.out.println("SO");
}
}
10/08/2013
11498 - Division of Nlogonia - Java
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment