Codeforces Round 276 (Div. 2)
A
Factory
Codeforces
1400
原题
←B →
翻译中…

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* ≤ 10^{5}$).

翻译中…

Output

翻译中…

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

翻译中…

样例

Input #1
1 5
Output #1
No
InputCopy OutputCopy
Input #2
3 6
Output #2
Yes
InputCopy OutputCopy
题目信息
题号
485A
时间限制
1 s
内存限制
256 MB
标签
模拟
数学
矩阵

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。