One industrial factory is reforming working plan. The director suggested to set a mythical detail production norm. If at the beginning of the day there were x details in the factory storage, then by the end of the day the factory has to produce <image> (remainder after dividing x by m) more details. Unfortunately, no customer has ever bought any mythical detail, so all the details produced stay on the factory. 

The board of directors are worried that the production by the given plan may eventually stop (that means that there will be а moment when the current number of details on the factory is divisible by m). 

Given the number of details a on the first day and number m check if the production stops at some moment.

Input

The first line contains two integers a and m (1 ≤ a, m ≤ 105).

Output

Print "Yes" (without quotes) if the production will eventually stop, otherwise print "No".

Examples

Input

1 5


Output

No


Input

3 6


Output

Yes
#from __future__ import division;
from bisect import *;
import sys;
from math import *;
from fractions import *;
from itertools import *;
import io;
import re;
from collections import Counter;
INF = 987654321987654321987654321;

def readint(delimiter=' ') :
	return map(int, raw_input().split(delimiter));

def readstr(delimiter=' ') :
	return raw_input().split(delimiter);

def readfloat(delimiter=' ') :
	return map(float, raw_input().split(delimiter));

def index(a, x):
	'Locate the leftmost value exactly equal to x'
	i = bisect_left(a, x)
	if i != len(a) and a[i] == x:
		return i
	raise ValueError

def find_lt(a, x):
	'Find rightmost value less than x'
	i = bisect_left(a, x)
	if i:
		return a[i-1]
	raise ValueError

def find_le(a, x):
	'Find rightmost value less than or equal to x'
	i = bisect_right(a, x)
	if i:
		return a[i-1]
	raise ValueError

def find_gt(a, x):
	'Find leftmost value greater than x'
	i = bisect_right(a, x)
	if i != len(a):
		return a[i]
	raise ValueError

def find_ge(a, x):
	'Find leftmost item greater than or equal to x'
	i = bisect_left(a, x)
	if i != len(a):
		return a[i]
	raise ValueError

def bin_search(a, x, left, right) :

	while left<=right :
		mid = (left + right)//2;

		if a[mid] == x :
			return mid;
		elif a[mid] < x :
			left = mid + 1;
		elif a[mid] > x :
			right = mid - 1;

		pass

	return -1;
	pass

def printf(format, *args):
	"""Format args with the first argument as format string, and write.
	Return the last arg, or format itself if there are no args."""
	sys.stdout.write(str(format) % args)
	pass


if __name__ == '__main__':
	a, m = readint();
	ans = False;
	for ii in xrange(m) :
		if a % m == 0 :
			ans = True;
		else :
			a = a + a % m;
		pass
	print "No" if ans == False else "Yes";
	pass
