{"problem":{"name":"Infinite Coins","description":{"content":"E869120 has $A$ $1$\\-yen coins and infinitely many $500$\\-yen coins.   Determine if he can pay exactly $N$ yen using only these coins.","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"abc088_a"},"statements":[{"statement_type":"Markdown","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.\n\n## Constraints\n\n*   $N$ is an integer between $1$ and $10000$ (inclusive).\n*   $A$ is an integer between $0$ and $1000$ (inclusive).\n\n## Input\n\nInput is given from Standard Input in the following format:\n\n$N$\n$A$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"abc088_a","tags":[],"sample_group":[["2018\n218","Yes\n\nWe can pay $2018$ yen with four $500$\\-yen coins and $18$ $1$\\-yen coins, so the answer is `Yes`."],["2763\n0","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."],["37\n514","Yes"]],"created_at":"2026-03-03 11:01:13"}}