import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner sc =new Scanner(System.in);
int s = 0;
int n = sc.nextInt();
while(n-- > 0){
int x = sc.nextInt();
s ^= x;
}
if(s != 0){
System.out.println("Yes");
}else{
System.out.println("No");
}
}
}
import java.util.Scanner;
public class Main{
static int N = 1010,V;
static int[] v = new int[N];
static int[] w = new int[N];
static int[][] f = new int[N][N];
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
V = sc.nextInt();
for(int i = 1; i <= n; i++){
v[i] = sc.nextInt();
w[i] = sc.nextInt();
}
for(int i = 1; i <= n; i++){
for(int j = 0; j <= V;j++){
f[i][j] = f[i - 1][j];
if(j >= v[i]){
f[i][j] = Math.max(f[i][j],f[i - 1][j - v[i]] + w[i]);
}
}
}
System.out.println(f[n][V]);
}
}
import java.util.Scanner;
public class Main{
static int N = 1010,V;
static int[] v = new int[N];
static int[] w = new int[N];
static int[] f = new int[N];
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
V = sc.nextInt();
for(int i = 1; i <= n; i++){
v[i] = sc.nextInt();
w[i] = sc.nextInt();
}
for(int i = 1; i <= n; i++){
for(int j = V; j >= v[i];j--){
f[j] = Math.max(f[j],f[j - v[i]] + w[i]);
}
}
System.out.println(f[V]);
}
}
import java.util.Scanner;
public class Main{
static int V,N = 1010;
static int[] v = new int[N];
static int[] w = new int[N];
static int[][] f = new int[N][N];
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
V = sc.nextInt();
for(int i = 1; i <= n; i++){
v[i] = sc.nextInt();
w[i] = sc.nextInt();
}
for(int i = 1; i <= n;i++){
for(int j = 0; j <= V;j++){
for(int k = 0;k * v[i] <= j; k++){
f[i][j] = Math.max(f[i][j],f[i - 1][j - k*v[i]] + k * w[i]);
}
}
}
System.out.println(f[n][V]);
}
}
import java.util.Scanner;
public class Main{
static int V,N = 1010;
static int[] v = new int[N];
static int[] w = new int[N];
static int[] f = new int[N];
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
V = sc.nextInt();
for(int i = 1; i <= n; i++){
v[i] = sc.nextInt();
w[i] = sc.nextInt();
}
for(int i = 1; i <= n;i++){
for(int j = v[i]; j <= V;j++){
f[j] = Math.max(f[j],f[j - v[i]] + w[i]);
}
}
System.out.println(f[V]);
}
}
import java.util.Scanner;
public class Main{
static int N = 1010,V;
static int[] v = new int[N];
static int[] w = new int[N];
static int[] s = new int[N];
static int[][] f = new int[N][N];
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
V =sc.nextInt();
for(int i = 1;i <= n; i++){
v[i] = sc.nextInt();
w[i] = sc.nextInt();
s[i] = sc.nextInt();
}
for(int i = 1; i <= n; i++){
for(int j = 0; j <= V; j++){
for(int k = 0; k * v[i] <= j && k <= s[i];k++){
f[i][j] = Math.max(f[i][j],f[i - 1][j - k * v[i]] + k * w[i]);
}
}
}
System.out.println(f[n][V]);
}
}
import java.io.*;
class Main{
static BufferedReader read = new BufferedReader(new InputStreamReader(System.in));
public static void main(String[] args) throws Exception{
String[] ss = read.readLine().split(" ");
int n = Integer.valueOf(ss[0]);
int m = Integer.valueOf(ss[1]);
int[] v = new int[n * 12];
int[] w = new int[n * 12];
int cnt = 0;
for(int i = 1; i <= n; i++){
ss = read.readLine().split(" ");
int a = Integer.valueOf(ss[0]);
int b = Integer.valueOf(ss[1]);
int s = Integer.valueOf(ss[2]);
int k = 1;
while(k <= s){
cnt++;
v[cnt] = a * k;
w[cnt] = b * k;
s -= k;
k <<= 1;
}
if(s > 0){
cnt++;
v[cnt] = a * s;
w[cnt] = b * s;
}
}
n = cnt;
int[] dp = new int[m + 1];
for(int i = 1; i <= n; i++){
for(int j = m; j >= v[i]; j--){
dp[j] = Math.max(dp[j], dp[j - v[i]] + w[i]);
}
}
System.out.println(dp[m]);
}
}
import java.util.Scanner;
public class Main{
static int N = 110;
static int[] f = new int[N];
static int[][] v = new int[N][N];
static int[][] w = new int[N][N];
static int[] s = new int[N];
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int V = sc.nextInt();
for(int i = 1; i <= n; i++){
s[i] = sc.nextInt();
for(int j = 0; j < s[i];j++){
v[i][j] = sc.nextInt();
w[i][j] = sc.nextInt();
}
}
for(int i = 1; i <= n; i++){
for(int j = V; j >= 0; j--){
for(int k = 0; k < s[i];k++ ){
if(v[i][k] <= j)
f[j] = Math.max(f[j],f[j - v[i][k]] + w[i][k]);
}
}
}
System.out.println(f[V]);
}
}