import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Arrays; import java.util.NoSuchElementException; public class Main implements Runnable { public static void main(String[] args) { new Thread(null, new Main(), "", Runtime.getRuntime().maxMemory()).start(); } final long mod = 998244353; long pow(long a, long n) { if (n == 0) return 1; return pow(a * a % mod, n / 2) * (n % 2 == 1 ? a : 1) % mod; } long inv(long a) { return pow(a, mod - 2); } boolean f(ArrayList a, int X, int bit) { if (a.size() <= 1) return true; if (bit < 0) return false; if ((X >> bit) % 2 == 1) { int c0 = 0; int c1 = 0; for (int v : a) { if ((v >> bit) % 2 == 0) ++c0; else ++c1; } return Math.abs(c0 - c1) <= 1; } else { ArrayList e = new ArrayList<>(); ArrayList o = new ArrayList<>(); for (int v : a) { if ((v >> bit) % 2 == 0) e.add(v); else o.add(v); } return f(e, X, bit-1) && f(o, X, bit-1); } } public void run() { FastScanner sc=new FastScanner(); PrintWriter pw=new PrintWriter(System.out); int N=sc.nextInt(); int X=sc.nextInt(); int[] A = new int[N]; ArrayList a = new ArrayList<>(); for (int i=0;i