import java.util.Scanner;
public class Main
{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int i, j, k=0;
int T = sc.nextInt();
int n; int find;
for (i=0; i<T; i++){
n = sc.nextInt(); find=sc.nextInt();
int[] box = new int[n+1]; for (j=1; j<=n; j++) box[j] = 0; // 0 is close, 1 is open
int student; int number_box;
for (student=1; student <= n; student++){ // 사물함번호가 학생번호에 의해 나눠지는 경우, box[number_box]는 짝수/홀수로 바뀜. 짝수면 close, 홀수면 open
for (number_box=student; number_box<=n; number_box++){
if (number_box % student == 0) box[number_box]++;
}
}
if (box[find] % 2 == 0) System.out.println("close");
else System.out.println("open");
}
}
}
이유를 도저히 모르겠네요 ㅜㅜ