PSAFAC - Factory

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  (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".

Example

Input:
1 5

Output:
No

Added by:PSA.X.A.N.A
Date:2014-11-08
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: ASM32-GCC ASM64 MAWK BC C-CLANG NCSHARP CPP14 CPP14-CLANG COBOL COFFEE D-CLANG D-DMD DART ELIXIR FANTOM FORTH GRV JS-MONKEY JULIA KTLN NIM OBJC OBJC-CLANG OCT PICO PROLOG PYPY3 R RACKET RUST CHICKEN SQLITE SWIFT UNLAMBDA VB.NET

hide comments
2014-11-13 10:26:33 wisfaq
Rejudge has obviously been done.
--ans(Francky)--> Thanks for your catch, rejudge hadn't been done at the time of my previous comment. psetter should have let a new comment in response. Problem visible now.

Last edit: 2014-11-13 11:00:10
2014-11-12 13:22:37 Francky
@psetter : please rejudge all submissions, and then your problem will be made visible. Thanks in advance.
2014-11-12 13:16:16 PSA.X.A.N.A
Sorry everybody, I fixed all errors of this problem. You can submit from now
2014-11-12 13:07:00 Jacob Plachta
Problem hidden until the data issues are resolved.
2014-11-12 13:07:00 mehmetin
@ivar: I think I/O files aren't present, or maybe there is another problem, if you submit empty source code, you get a score of 10. In certain languages you get compile error or 0 points.

Last edit: 2014-11-09 17:36:39
2014-11-12 13:07:00 ivar.raknahs
is there any problem with judge? result,time,mem=0?
2014-11-12 13:07:00 wisfaq
Are there any I/O files?
2014-11-12 13:07:00 Jacob Plachta
Classical problems with numerical scoring are counted as if they were Challenge problems for the purposes of points/rank. So, please either change the scoring to binary, or move this problem to the Partial category.
2014-11-12 13:07:00 Akhilesh Anandh
Is there some error in the judge? Why does it say Result = 0, time = 0.0, memory = 0k (not possible) ?
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.