传送门:http://acm.hdu.edu.cn/showproblem.php?pid=1851
import java.io.*;
import java.math.*;
import java.util.*;
public class Main{
public static void main(String argv[]){
Scanner cin = new Scanner(System.in);
int T,A,L;
int n,ans;
T = cin.nextInt();
while(T > 0){
T -- ;
ans = 0;
n = cin.nextInt();
for(int i = 1 ; i <= n ; i++) {
A = cin.nextInt();
L = cin.nextInt();
ans = ans ^ (A % (L + 1));
}
// System.out.println(ans);
if(ans == 0) System.out.println("Yes");
else System.out.println("No");
}
}
}