{"raw_statement":[{"iden":"problem statement","content":"E869120 has $A$ $1$\\-yen coins and infinitely many $500$\\-yen coins.  \nDetermine if he can pay exactly $N$ yen using only these coins."},{"iden":"constraints","content":"*   $N$ is an integer between $1$ and $10000$ (inclusive).\n*   $A$ is an integer between $0$ and $1000$ (inclusive)."},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$N$\n$A$"},{"iden":"sample input 1","content":"2018\n218"},{"iden":"sample output 1","content":"Yes\n\nWe can pay $2018$ yen with four $500$\\-yen coins and $18$ $1$\\-yen coins, so the answer is `Yes`."},{"iden":"sample input 2","content":"2763\n0"},{"iden":"sample output 2","content":"No\n\nWhen we have no $1$\\-yen coins, we can only pay a multiple of $500$ yen using only $500$\\-yen coins. Since $2763$ is not a multiple of $500$, we cannot pay this amount."},{"iden":"sample input 3","content":"37\n514"},{"iden":"sample output 3","content":"Yes"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}