You are given two positive integers x and y. You can perform the following operation with x: write it in its binary form without leading zeros, add 0 or 1 to the right of it, reverse the binary form and turn it into a decimal number which is assigned as the new value of x.

For example: 

  * 34 can be turned into 81 via one operation: the binary form of 34 is 100010, if you add 1, reverse it and remove leading zeros, you will get 1010001, which is the binary form of 81. 
  * 34 can be turned into 17 via one operation: the binary form of 34 is 100010, if you add 0, reverse it and remove leading zeros, you will get 10001, which is the binary form of 17. 
  * 81 can be turned into 69 via one operation: the binary form of 81 is 1010001, if you add 0, reverse it and remove leading zeros, you will get 1000101, which is the binary form of 69. 
  * 34 can be turned into 69 via two operations: first you turn 34 into 81 and then 81 into 69. 



Your task is to find out whether x can be turned into y after a certain number of operations (possibly zero).

Input

The only line of the input contains two integers x and y (1 ≤ x, y ≤ 10^{18}).

Output

Print YES if you can make x equal to y and NO if you can't.

Examples

Input


3 3


Output


YES


Input


7 4


Output


NO


Input


2 8


Output


NO


Input


34 69


Output


YES


Input


8935891487501725 71487131900013807


Output


YES

Note

In the first example, you don't even need to do anything.

The fourth example is described in the statement.
470060730774588924 727173667167621133
 23654897456254158 36584562123658749
 100 100
 1048576 1048576
 3165137368662540 34690334760256012
 2963671906804332 23709375254434663
 2 2
 469234491891472796 290944711594072288
 10 5
 662695912942035259 813128064161
 10 576460752303423487
 9762130370617853 135862919936991741
 407 113
 88888888888888888 99999999999999999
 20 607
 968503512949840 70798422886785671
 4997 4748
 20 20
 11 27
 2651 1994
 114514 114514
 642061520256 807582787377560508
 100 403
 95 427
 4 4
 98376470102098 8668311108715159
 2 6
 8935891487501725 71986286270688669
 6 1
 90 180
 5 55
 8 1
 11 13
 4529535624500812 36236284996006503
 1717 879
 54043195528445952 3
 32 457
 12312 12312
 1579442997370991 12635543978967935
 41 119
 272137586985970 17939699391684503
 8 8
 32 32
 2651 21215
 592255623895602343 956231061252005500
 22 107
 1 576460752303423487
 1 67108863
 470886973952672348 163402627036137273
 3991380546745964 35516577938339436
 435 1515
 4997 39983
 18014398509481984 54043195528445952
 6261 668
 45454 45454
 1 1125899906842623
 3145302420099927 25162419360799423
 26 47
 25 19
 999999999999999999 864691128455135231
 10 10
 1 2147483647
 4 5
 44 44
 22 11
 985 1653
 794746691033263 69408368311453055
 100 201
 10 11
 13 11
 753 271
 16 16
 2 1
 942220828365 412458936303
 407 3263
 5 10
 34 17
 44 29
 42 2193386110975
 753 6031

NO
 NO
 YES
 YES
 NO
 YES
 YES
 NO
 YES
 NO
 NO
 YES
 NO
 NO
 YES
 YES
 NO
 YES
 YES
 NO
 YES
 NO
 YES
 NO
 YES
 YES
 NO
 YES
 NO
 NO
 YES
 YES
 YES
 YES
 NO
 YES
 NO
 YES
 YES
 NO
 YES
 YES
 YES
 YES
 NO
 NO
 YES
 YES
 NO
 NO
 NO
 YES
 NO
 NO
 YES
 YES
 YES
 YES
 YES
 NO
 YES
 YES
 NO
 YES
 YES
 NO
 YES
 YES
 YES
 YES
 NO
 YES
 YES
 NO
 YES
 NO
 YES
 YES
 YES
 YES

import java.util.*;
import java.io.*;

public class Practice {
	static boolean multipleTC = false;
	FastReader in;
	PrintWriter out;

	static int mod = (int) (1e9 + 7);
	int mod2 = 998244353;
	int parent[];
	int rank[];

	public static void main(String[] args) throws Exception {
		new Practice().run();
	}

	void run() throws Exception {
		in = new FastReader();
		out = new PrintWriter(System.out);
		int T = (multipleTC) ? ni() : 1;
		pre();
		for (int t = 1; t <= T; t++)
			solve(t);
		out.flush();
		out.close();
	}

	void pre() throws Exception {
	}

	void solve(int TC) throws Exception {
		long x = nl();
		long y = nl();
		String bin1 = Long.toBinaryString(x);
		String bin2 = Long.toBinaryString(y);
		if (bin1.charAt(bin1.length() - 1) == '1' || bin1.equals(bin2)) {
			String reversed = reverse(bin1);
			if (bin2.contains(bin1) && check(bin1, bin2)) {
				pn("YES");
			} else if (bin2.contains(reversed) && check(reversed, bin2)) {
				pn("YES");
			} else {
				pn("NO");
			}

		} else {
			String pos1 = bin1 + '1';
			String pos2 = reverse(pos1);
			int i = bin1.length() - 1;
			while (i >= 0 && bin1.charAt(i) == '0')
				i--;
			String pos3 = bin1.substring(0, i + 1);
			String pos4 = reverse(pos3);
			if ((bin2.contains(pos1) && check(pos1, bin2)) || (bin2.contains(pos2) && check(pos2, bin2))
					|| (bin2.contains(pos3) && check(pos3, bin2)) || (bin2.contains(pos4) && check(pos4, bin2))) {
				pn("YES");
			} else {
				pn("NO");
			}
		}

	}

	boolean check(String bin1, String bin2) {
		int idx = bin2.indexOf(bin1);
		int forwardZeroes = 0;
		int backwardZeroes = 0;
		for (int i = idx - 1; i >= 0; i--) {
			if (bin2.charAt(i) == '0') {
				forwardZeroes++;
			}
		}
		int n = bin2.length();
		for (int i = idx + bin1.length(); i < n; i++) {
			if (bin2.charAt(i) == '0') {
				backwardZeroes++;
			}
		}
		return forwardZeroes == 0 && backwardZeroes == 0;
	}

	String reverse(String str) {
		char arr[] = str.toCharArray();
		int right = str.length() - 1;
		int left = 0;
		while (left < right) {
			char temp = arr[left];
			arr[left] = arr[right];
			arr[right] = temp;
			left++;
			right--;
		}
		return new String(arr);

	}

	void union(int u, int v) {
		u = findParent(u);
		v = findParent(v);
		if (rank[u] > rank[v]) {
			parent[v] = u;
		} else if (rank[u] < rank[v]) {
			parent[u] = v;
		} else {
			parent[v] = u;
			rank[u]++;
		}
	}

	int findParent(int v) {
		if (v == parent[v])
			return v;
		return parent[v] = findParent(parent[v]);
	}

	StringBuilder printArr(int arr[]) {
		StringBuilder sb = new StringBuilder();
		int n = arr.length;
		for (int i = 0; i < n; i++) {
			sb.append(arr[i] + " ");
		}
		return sb;
	}

	StringBuilder printArr(long arr[]) {
		StringBuilder sb = new StringBuilder();
		int n = arr.length;
		for (int i = 0; i < n; i++) {
			sb.append(arr[i] + " ");
		}
		return sb;
	}

	class pair {
		int x, y;

		pair(int x, int y) {
			this.x = x;
			this.y = y;
		}

		@Override
		public String toString() {
			return " " + x + ", " + y + "]";
		}

	}

	class pairL {
		long x, y;

		pairL(long x, long y) {
			this.x = x;
			this.y = y;
		}

		@Override
		public String toString() {
			return " " + x + ", " + y + "]";
		}

	}

	boolean isSorted(int arr[]) {
		for (int i = 0; i < arr.length - 1; i++) {
			if (arr[i] > arr[i + 1]) {
				return false;
			}
		}
		return true;
	}

	void swap(int arr[], int x, int y) {
		int t = arr[x];
		arr[x] = arr[y];
		arr[y] = t;
	}

	static int bitCount(int x) {
		return x == 0 ? 0 : (1 + bitCount(x & (x - 1)));
	}

	void sort(long arr[]) {
		ArrayList<Long> list = new ArrayList<>();
		for (int i = 0; i < arr.length; i++)
			list.add(arr[i]);
		Collections.sort(list);
		for (int i = 0; i < arr.length; i++)
			arr[i] = list.get(i);
	}

	static void dbg(Object... o) {
		System.err.println(Arrays.deepToString(o));
	}

	ArrayList<Long> primeFactorization(long n) {
		ArrayList<Long> factorization = new ArrayList<>();
		while (n % 2 == 0) {
			factorization.add(2L);
			n /= 2;
		}
		for (long d = 3; d * d <= n; d += 2) {
			while (n % d == 0) {
				factorization.add(d);
				n /= d;
			}
		}
		if (n > 1)
			factorization.add(n);
		return factorization;
	}

	public static boolean isPrime(long n) {
		if (n < 2)
			return false;
		if (n == 2 || n == 3)
			return true;
		if (n % 2 == 0 || n % 3 == 0)
			return false;
		long sqrtN = (long) Math.sqrt(n) + 1;
		for (long i = 6L; i <= sqrtN; i += 6) {
			if (n % (i - 1) == 0 || n % (i + 1) == 0)
				return false;
		}
		return true;
	}

	public static long gcd(long a, long b) {
		if (a > b)
			a = (a + b) - (b = a);
		if (a == 0L)
			return b;
		return gcd(b % a, a);
	}

	public long binaryExpo(long base, long exp) {
		long res = 1;
		while (exp > 0) {
			if ((exp & 1) == 1)
				res = res * base;
			base = base * base;
			exp >>= 1;
		}
		return res;
	}

	public long pow(long base, long exp, long MOD) {
		base %= MOD;
		long res = 1;
		while (exp > 0) {
			if ((exp & 1) == 1)
				res = res * base % MOD;
			base = base * base % MOD;
			exp >>= 1;
		}
		return res;
	}

	public static long totient(long n) {
		long result = n;
		for (int p = 2; p * p <= n; ++p)
			if (n % p == 0) {
				while (n % p == 0)
					n /= p;
				result -= result / p;
			}
		if (n > 1)
			result -= result / n;
		return result;
	}

	int bit(long n) {
		return (n == 0) ? 0 : (1 + bit(n & (n - 1)));
	}

	public long max(long... arr) {
		long max = arr[0];
		for (long itr : arr)
			max = Math.max(max, itr);
		return max;
	}

	public int max(int... arr) {
		int max = arr[0];
		for (int itr : arr)
			max = Math.max(max, itr);
		return max;
	}

	public long min(long... arr) {
		long min = arr[0];
		for (long itr : arr)
			min = Math.min(min, itr);
		return min;
	}

	public int min(int... arr) {
		int min = arr[0];
		for (int itr : arr)
			min = Math.min(min, itr);
		return min;
	}

	public long sum(long... arr) {
		long sum = 0;
		for (long itr : arr)
			sum += itr;
		return sum;
	}

	public long sum(int... arr) {
		long sum = 0;
		for (int itr : arr)
			sum += itr;
		return sum;
	}

	void p(Object o) {
		out.print(o);
	}

	void pn(Object o) {
		out.println(o);
	}

	void pni(Object o) {
		out.println(o);
		out.flush();
	}

	String n() throws Exception {
		return in.next();
	}

	String nln() throws Exception {
		return in.nextLine();
	}

	int ni() throws Exception {
		return Integer.parseInt(in.next());
	}

	long nl() throws Exception {
		return Long.parseLong(in.next());
	}

	long[] readArr(int n) throws Exception {
		long arr[] = new long[n];
		for (int i = 0; i < n; i++) {
			arr[i] = nl();
		}
		return arr;
	}

	double nd() throws Exception {
		return Double.parseDouble(in.next());
	}

	class FastReader {
		BufferedReader br;
		StringTokenizer st;

		public FastReader() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}

		public FastReader(String s) throws Exception {
			br = new BufferedReader(new FileReader(s));
		}

		String next() throws Exception {
			while (st == null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					throw new Exception(e.toString());
				}
			}
			return st.nextToken();
		}

		String nextLine() throws Exception {
			String str = "";
			try {
				str = br.readLine();
			} catch (IOException e) {
				throw new Exception(e.toString());
			}
			return str;
		}
	}
}