Problem:


Score: 100 points

Problem Statement

E869120 has A 1-yen coins and infinitely many 500-yen coins.

Determine if he can pay exactly N yen using only these coins.

Constraints

N is an integer between 1 and 10000 (inclusive).

A is an integer between 0 and 1000 (inclusive).

Input

Input is given from Standard Input in the following format:

N
A

Output

If E869120 can pay exactly N yen using only his 1-yen and 500-yen coins, print Yes; otherwise, print No.

Sample Input 1

2018
218

Sample Output 1

Yes

We can pay 2018 yen with four 500-yen coins and 18 1-yen coins, so the answer is Yes.

Sample Input 2

2763
0

Sample Output 2

No

When 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.

Sample Input 3

37
514

Sample Output 3

Yes



Sample input:
2018
218


Sample output:
Yes

Submission status: Wrong Answer

Solution code:
N = int(input())
A = int(input())
if (N%500) < A:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
N, A = [int(input()) for i in range(2)]
if (N%500) < A:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
N, A = [int(input()) for i in range(2)]
if (N % 500) < A:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())
A = int(input())

if N/500 >=1 and N%500 <= A:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())
A = int(input())

if N/500 >=1 and N%500 <= A:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())
A = int(input())

x = N % 4
if x <= A:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
a = int(input())
cost = int(input())
if cost % 500 <= a:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
n = int(input())
a = int(input())

n //= 500

print('Yes' if 0 <= n <= a else 'No')

Submission status: Wrong Answer

Solution code:
n = int(input()) // 500
a = int(input())

print('Yes' if 0 <= n <= a else 'No')

Submission status: Wrong Answer

Solution code:
print(["Yes","No"][int(input())<int(input())%500])

Submission status: Wrong Answer

Solution code:
N=int(input())
A=int(input())
if N%500>=A:
  print('No')
else:
  print('Yes')

Submission status: Wrong Answer

Solution code:
N = int(input())
A = int(input())
if N % 500 < A:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
N=int(input())
A=int(input())
m=0
while m<=N:
  m+=500
if N-m<=A:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
print("Yes" if (int(input()) % 500) < int(input()) else "No")

Submission status: Wrong Answer

Solution code:
N=int(input())
A=int(input())
print("Yes" if N-N//500*500<A else "No")

Submission status: Wrong Answer

Solution code:
N = int(input())
A = int(input())

B = N - N//500
if B <= A:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())
A = int(input())

B = N // 500
if B <= A:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
n=int(input())
a=int(input())

if a%500<=n:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
n=int(input())
a=int(input())

if a <= n or (500<=a and a<=500+n):
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
N = int(input())
A = int(input())
if A%500 <= N:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())
A = int(input())
flag = False
for i in range(A):
    if (N-i) % 500 == 0:
        flag = True
        break
print('Yes' if flag else 'No')

Submission status: Wrong Answer

Solution code:
N=int(input())
A=int(input())
mod = N%500
if mod<=A:
	print('YES')
else:
	print('NO')

Submission status: Wrong Answer

Solution code:
A = int(input())
N = int(input())

if N % 500 <= A:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
#--Infinite Coins
cost = int(input())
one_coins = int(input())

for i in range(one_coins):
  calculate = cost - i
  if (calculate % 500 == 0):
    print ("Yes")
    exit()
  else:
    pass

print("No")

Submission status: Wrong Answer

Solution code:
n = input()
a = input()
x = int(n)%500
if x<=int(a):
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

Solution code:
def resolve():
    N = int(input())
    A = int(input())
    print("Yes" if N % 500 < A else "No")


if '__main__' == __name__:
    resolve()

Submission status: Wrong Answer

Solution code:
n=int(input())//500
a=int(input())
print('Yes' if a>=n else 'No')

Submission status: Wrong Answer

Solution code:
price = int(input())
num1 = int(input())

amari = price % 500
print(amari)

if amari > num1:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
a=int(input())
b=int(input())
if a%500 < b:
  print('Yes')
else: print('No')

Submission status: Wrong Answer

Solution code:
N=int(input())
A=int(input())

for x in range(A-1):
  if N%500<=A:
    print("Yes")
    break
else:
  print("No")

Submission status: Wrong Answer

Solution code:
N=int(input())
A=int(input())

for x in range(min(A,500)):
  if (N-x)%500==0:
    print("Yes")
    break
else:
  print("No")

Submission status: Wrong Answer

Solution code:
N=int(input())
A=int(input())

for x in range(A-1):
  if (N-x)%500==0:
    print("Yes")
    break
else:
  print("No")

Submission status: Wrong Answer

Solution code:
N=int(input())
A=int(input())

for x in range(A-1):
  if (N-x)%500==0:
    print("YES")
    break
else:
  print("NO")

Submission status: Wrong Answer

Solution code:
n=int(input())
a=int(input())
if n-n//500<=a:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
n=int(input())
a=int(input())
if a==0:
    if n%500==0:
        print("Yes")
    else:
        print("No")
elif n//500+a>=n:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
n=int(input())
a=int(input())
if a==0:
    if n%500==0:
        print("Yes")
    else:
        print("No")
else:
    print("Yes")

Submission status: Wrong Answer

Solution code:
N = int(input())
A = int(input())

ans = 0


while ans<=(N-500):
    ans += 500

while A>=0:
    if ans==N:
        print('Yes')
        break
    else:
        ans += 1
        A -= 1

if ans!=N:
    print('No')

Submission status: Wrong Answer

Solution code:
N = int(input())
A = int(input())

ans = 0


while ans<=(N-500):
    ans += 500

while A>=0:
    if ans==N:
        print('Yes')
        break
    ans += 1
    A -= 1

if ans!=N:
    print('No')

Submission status: Wrong Answer

Solution code:
N = int(input())
A = int(input())

ans = 0


while ans<=(N-500):
    ans += 500

while A>0:
    if ans==N:
        print('Yes')
        break
    ans += 1
    A -= 1

if ans!=N:
    print('No')

Submission status: Wrong Answer

Solution code:
N = int(input())
A = int(input())

ans = 0


while ans<(N-500):
    ans += 500

while A>0:
    ans += 1
    A -= 1
    if ans==N:
        print('Yes')
        break

if ans!=N:
    print('No')

Submission status: Wrong Answer

Solution code:
N=int(input())
A=int(input())
if A >= (N%500):
  print('Yes')
else:
  print('no')

Submission status: Wrong Answer

Solution code:
a = int(input())
b = int(input())

result = a % 500

if result - b < 0:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
n=int(input())
a=int(input())
if n%500<a:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
a= int(input())
b= int(input())

result = a%500

if result - b < 0:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
N,A=[int(input()) for i in range(2)]
print('Yes'if N%50<=A else 'No')

Submission status: Wrong Answer

Solution code:
N=int(input())
A=int(input())
if((N-A)%500==0 or N<=A):
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())
A = int(input())

if (N % 500 <= A):
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

Solution code:
N = int(input())
A = int(input())

if N % 500 <= A:
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

Solution code:
n = int(input())
n //= 500
a = int(input())
if n <= a:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
N=int(input())
A=int(input())

if N%500<=A:
	print('YES')
else:
	print('NO')

Submission status: Wrong Answer

Solution code:
N = int(input())
S = int(input())
L = N % 500
if L < S:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
n = input()
a = list(map(int, input().split()))
a.sort(reverse=True)
print(sum(a[::2]) - sum(a[1::2]))

Submission status: Wrong Answer

Solution code:
N = int(input())
A = int(input())

N = N // 500
if N <= A:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
n = int(input())
a = int(input())
left = n % 500
if left >= a:
  print("No")
else:
  print("Yes")

Submission status: Wrong Answer

Solution code:
n = int(input())
a = int(input())
if n % 500 < a:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
def calc():

    amari = N % 500

    if amari >= A:
        return"Yes"

    else:
        return"No"

N = int(input())
A = int(input())

print(calc())

Submission status: Wrong Answer

Solution code:
n = int(input())
a = int(input())

tmp = n % 500

if tmp <= n:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
import sys
import copy
import math
import bisect
import pprint
import bisect
from functools import reduce
from copy import deepcopy
from collections import deque

if __name__ == '__main__':
    a = int(input())
    b = int(input())
    c = a //500

    if c <= b:
        print("Yes")
    else:
        print("No")

Submission status: Wrong Answer

Solution code:
import sys
import copy
import math
import bisect
import pprint
import bisect
from functools import reduce
from copy import deepcopy
from collections import deque

if __name__ == '__main__':
    a = int(input())
    b = int(input())
    c = a //500

    if c <= b:
        print("Yes")
    else:
        print("N0")

Submission status: Wrong Answer

Solution code:
N = int(input())
A = int(input())
amari = N % 500
if A > amari:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
print('Yes' if (int(input()) // 500) <= int(input()) else 'No')

Submission status: Wrong Answer

Solution code:
print('Yes' if (int(input()) // 500) < int(input()) else 'No')

Submission status: Wrong Answer

Solution code:
import math

n = int(input())
a = int(input())
cont =0;

cont = n/500
n=n%500

if(a>=n):
	cont+=n
	print("YES")
else:
	print("NO")

Submission status: Wrong Answer

Solution code:
a = int(input())
b = int(input())

c = a % 500

if b >= c:
    print('Yes')
else:
    print('NO')

Submission status: Wrong Answer

Solution code:
N=int(input())
A=int(input())
print("Yes" if A>N%500 else "No")

Submission status: Wrong Answer

Solution code:
N = int(input())
A = int(input())

M = N % 500
if M <= A:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
N = int(input())
A = int(input())

M = N % 500
if M < A:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
a=int(input())
n=int(input())

amari=int(n%500)

if amari<=a:
    print('Yes')

else:
    print('No')

Submission status: Wrong Answer

Solution code:
x, a = [int(input()) for i in range(2)]
print("Yes" if a > x%500 else "No" )

Submission status: Wrong Answer

Solution code:
n=int(input())
a=int(input())

if n>=500:
    n=n//500

if n<=a:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
print("Yes" if int(input()) // 500 <= int(input()) else "No")

Submission status: Wrong Answer

Solution code:
N = int(input())
A = int(input())

a = N % 500
if a <= A:
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

Solution code:
N=int(input())
A=int(input())
number=0
for a in range(A):
    b=N-a
    if b%500==0:
        print('Yes')
        number+=1
        break
if number==0:
    print('No')

Submission status: Wrong Answer

Solution code:
N = int(input())
A = int(input())

rmn = N // 500

if rmn <= A:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())
A = int(input())

if N % 500 <= A:
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

Solution code:
n = int(input())
a = int(input())

n = n % 500

if a > n:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
n = int(input())
a = int(input())
remainder = n % 500
if remainder <= a:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
s = int(input())

Submission status: Wrong Answer

Solution code:
N = int(input())
A = int(input())
print('No' if A == 0 and N % 500 != 0 else 'Yes')

Submission status: Wrong Answer

Solution code:
import sys
n = int(sys.stdin.readline())
a = int(sys.stdin.readline())

if n % 500 < a:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
# 支払うべき金額
N = int(input())
# 持っている1円硬貨の枚数
A = int(input())
# 支払いに使う500円玉の枚数と1円玉で払うべき金額
mod = N % 500
a = N - 500*mod
#支払い可不可判定
if a <= A:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
a,b=[int(input()) for _ in range(2)]
print("Yes" if a%500 < b else "No")

Submission status: Wrong Answer

Solution code:
n = int(input())
a = int(input())

mod = n%500

if (mod < a) and (a > 0):
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
n = int(input())
a = int(input())

mod = n%500
print(mod)
if (mod < a) and (a > 0):
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
N=int(input())
A=int(input())
if N//500 <=A:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
n = int(input())
a = int(input())
print('Yes' if ((n%500)-a)<0 else 'No')

Submission status: Wrong Answer

Solution code:
N=int(input())
A=int(input())

if N%500 <= A:
  print("YES")
elif N%500 > A:
  print("NO")

Submission status: Wrong Answer

Solution code:
N = int(input())#支払額
A = int(input())#1円の所持数
B = N % 500
if A > B:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
N, A = [int(input()) for _ in range(2)]

if N >= A:
  if (N - A) % 500 == 0:
    print('Yes')
  else:
    print('No')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
N, A = [int(input()) for _ in range(2)]

if (N - A) % 500 == 0:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
N, A = [int(input()) for _ in range(2)]

if (N - A) % 500 == 0:
  print('YES')
else:
  print('NO')

Submission status: Wrong Answer

Solution code:
n = int(input())
a = int(input())

if a - (n % 500) > 0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())
A = int(input())

if N % 500 < A:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
# -*- coding:utf-8 -*-
n = int(input())
a = int(input())

if (a % 500) <= n:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
# -*- coding:utf-8 -*-
n = int(input())
a = int(input())

if (a % 500) < n:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
N = int(input())
A = int(input())
if N%500 <= A:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
N = int(input())
A = int(input())
x = N%500
if x <= A:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
N=int(input())
A=int(input())
if A==0 :
  print("No")
else :
  print("Yes")

Submission status: Wrong Answer

Solution code:
n = int(input())
a = int(input())
cost = n % 500
if cost < a:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
n = int(input())
a=int(input())
print("Yes" if (n-a)%500==0 else "No")

Submission status: Wrong Answer

Solution code:
n = int(input())
a = int(input())
if n%500<a:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
N = input()
A = input()
y = N/500
if y == 0:
    print "Yes"
elif N-500*y < A:
    print "Yes"
else:
    print "No"

Submission status: Wrong Answer

Solution code:
a =input()
n=input()
if a >= n%500: 
  print "Yes"
else: 
  print"No"

Submission status: Wrong Answer

Solution code:
a=input()
n=input()
if a >= n%500: 
  print "Yes"
else: 
  print"No"

Submission status: Wrong Answer

Solution code:
a=input()
n=input()
if a > n%500: 
  print "Yes"
else: 
  print"No"

Submission status: Wrong Answer

Solution code:
n = int(input())
a = int(input())
print('Yes' if n % 500 >= a else 'No')

Submission status: Wrong Answer

Solution code:
n = int(input())
a = int(input())


if n <= a:
    print("Yes")
    exit()
if a == 0:
    if n % 500 == 0:
        print("Yes")
    else:
        print("No")
if n % 500 <= a:
    print("Yes")

Submission status: Wrong Answer

Solution code:
n = int(input())
a = int(input())

if a == 0:
    print("No")
    exit()
if n <= a:
    print("Yes")
    exit()
if n % 500 <= a:
    print("Yes")

Submission status: Wrong Answer

Solution code:
n = int(input())
a = int(input())

if a == 0:
    print("No")
    exit()
if n % 500 <= a:
    print("Yes")

Submission status: Wrong Answer

Solution code:
n = int(input())
a = int(input())

m = n // 500
if m <= a:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
N = int(input())
A = int(input())
if(N%100 <= A):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
N = int(input())
A = int(input())
if(N%100 < A):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
print("Yes" if int(input())//500<=int(input()) else "No")

Submission status: Wrong Answer

Solution code:
N =int(input())
A =int(input())
a = N%500
if a<A:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())
A = int(input())

remain = N % 500

if remain <= N:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
n = int(input())
a = int(input())
if n % 500 >= a:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
a = int(input())
b = int(input())
x = a%500
if x <= b:
  print("Yes")
else:
  print("NO")

Submission status: Wrong Answer

Solution code:
a = int(input())
b = int(input())
if a % 500 <= b:
  print("Yes")
else:
  print("NO")

Submission status: Wrong Answer

Solution code:
n = int(input())
a_lis = list(map(int, input().split()))
a_lis.sort(reverse=True)
alice = True
al_lis = []
bo_lis = []
for i in a_lis:
    if alice:
        al_lis.append(i)
    else:
        bo_lis.append(i)
    alice = not alice
print(sum(al_lis) - sum(bo_lis))

Submission status: Wrong Answer

Solution code:
N = input()
A = input()

n = int(N)
a = int(A)


x = n % 500

if x > a:
  print("Yes")
elif x == a:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
N = input()
A = input()
n = int(N)
a = int(A)


x = n % 500

if x >= a:
	print("Yes")
else:
	print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())
A = int(input())


x = N % 500

if x >= A:
	print("Yes")
else:
	print("No")

Submission status: Wrong Answer

Solution code:
n = int(input())
a = int(input())
if n % 500 <= a:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
n = int(input())
a = int(input())

if (n % 500) < a:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())
A = int(input())
N_last = N % 500
if N_last < A :
    print("Yes")
else :
    print("No")

Submission status: Wrong Answer

Solution code:
n = int(input())
a = int(input())
tmp = n - (n//500)*500
if n<=a: print('Yes')
else: print('No')

Submission status: Wrong Answer

Solution code:
print('No')if int(input())%500>int(input())else print('No')

Submission status: Wrong Answer

Solution code:
N = int(input())
A = int(input())


if A == 0:
    print("No")
    exit()

ans = N % A
print("Yes" if ans <= A else "No")

Submission status: Wrong Answer

Solution code:
N = int(input())
A = int(input())

if A >= N:
    print("Yes")
    exit()

elif A == 0:
    print("No")
    exit()

else:
    while A > 0:
        if N % 500:
            print("Yes")
            exit()

        A -= 1

print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())
A = int(input())

if N // 500 <= A:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
print('YNeos'[int(input())%50>int(input())::2])

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
# 整数の入力
n = int(input())
a = int(input())
# スペース区切りの整数の入力
# b, c = map(int, input().split())
# 文字列の入力
# s = input()
# # 出力
# print("{} {}".format(a+b+c, s))

if n < 500:
    if n >= a:
        print('Yes')
    else:
        print('No')
else:    
    amari = n%500
    if amari <= a:
        print('Yes')
    else:
        print('No')

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
# 整数の入力
n = int(input())
a = int(input())
# スペース区切りの整数の入力
# b, c = map(int, input().split())
# 文字列の入力
# s = input()
# # 出力
# print("{} {}".format(a+b+c, s))

if n < 500:
    if n > a:
        print('Yes')
    else:
        print('No')
else:    
    amari = n%500
    if amari < a:
        print('Yes')
    else:
        print('No')

Submission status: Wrong Answer

Solution code:
N=int(input())
A=int(input())
p=N%500
print("Yes" if p<A else "No")

Submission status: Wrong Answer

Solution code:
N = int(input())
A = int(input())

if (N%500) < A:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())
A = int(input())
if N%500 > A:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
n = int(input())
a = int(input())

b = n % 500

if a >= b:
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


def main():
    N = int(input())
    A = int(input())
    print('Yes'if N // 500 <= A else'No')


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


def main():
    N = int(input())
    A = int(input())
    print('Yes'if N // 500 < A else'No')


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
en = int(input())
ichien = int(input())
dst = "YES" if en % 500 <= ichien else "NO"
print(dst)

Submission status: Wrong Answer

Solution code:
a=int(input())
b=int(input())
print("Yes" if a%500 - b <0 else "No")

Submission status: Wrong Answer

Solution code:
N=int(input())
A=int(input())

if ((N-A)%500==0)or(N<=A):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:

n=int(input())
a=int(input())
if n%500<a:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
n=int(input())
a = int(input())
if a >= n//500:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
a=int(input())
n=int(input())
n%=500
if n > a:
  print("No")
else:
  print("Yes")

Submission status: Wrong Answer

Solution code:
"""
author : halo2halo
date : 24, Jan, 2020
"""

import sys
import itertools

# import numpy as np

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

N, A = map(int, read().split())

print('Yes' if N // 500 <= A else 'No')

Submission status: Wrong Answer

Solution code:
n=int(input())
a=int(input())
if n//500<=a:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
n = int(input())
a = int(input())

while n > 500:
    n -= 500
    
if n <= a:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
A = int(input())
N = int(input())
print("Yes" if N % 500 <= A else "No")

Submission status: Wrong Answer

Solution code:
A = int(input())
N = int(input())
print("Yes" if N % 500 < A else "No")

Submission status: Wrong Answer

Solution code:
n = int(input())
a = int(input())
j = n % 500
if (j <= a):
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

Solution code:
n = int(input())
a = int(input())
j = n % 500
print(n, a, j)
if (j <= a):
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

Solution code:
n = int(input())
a = int(input())
j = n % 500
if (j <= a):
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

Solution code:
N = int(input())
A = int(input())
if N <= A:
    print("Yes")
elif N - 500 <= A:
    print ("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
# hi hi hi hi hi hi hi
# hi hi hi hi hi hi hi# hi hi hi hi hi hi hi# hi hi hi hi hi hi hi# hi hi hi hi hi hi hi# hi hi hi hi hi hi hi# hi hi hi hi hi hi hi# hi hi hi hi hi hi hi
print("t")

Submission status: Wrong Answer

Solution code:
N=int(input())
A=int(input())
count=0
for i in range(0, A+1):
    if (N-i)%500 == 0:
        print('Yes')
        count=1
        break
print("Yes" if count==1 else "No")

Submission status: Wrong Answer

Solution code:
N=int(input())
A=int(input())
print("Yes" if N%(500+A) == 0 else "No")

Submission status: Wrong Answer

Solution code:
N=int(input())
A=int(input())
print("Yes" if (N-A)%500==0 else "No")

Submission status: Wrong Answer

Solution code:
n = int(input())%500
a = int(input())
if n >= a:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
n = int(input())//500
a = int(input())
if n >= a:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
a,b = (int(input()) for _ in range(2))
print("Yes" if a%500<b else "No")

Submission status: Wrong Answer

Solution code:
N = int(input())
A = int(input())
for a in range(A+1):
    if (N-a)%500 == 0:
        print("YES")
        exit()
print("NO")

Submission status: Wrong Answer

Solution code:
N = int(input())
A = int(input())
for a in range(A):
    if (N-a)%500 == 0:
        print("YES")
        exit()
print("NO")

Submission status: Wrong Answer

Solution code:
N = int(input())
A = int(input())
if (N-A)%500 == 0:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
N = int(input())
A = int(input())

a = 0
for i in range(20):
  if N >= 500*(i+1):
    a =  500*(i+1)
  else:
    continue
    
b = N - a

if b <= A:
  print("Yes")
else:
  print("No")
print(b)

Submission status: Wrong Answer

Solution code:
N = int(input())
A = int(input())

a = 0
for i in range(20):
  if N > 500*(i+1):
    a = a + 500
  else:
    continue
    
b = N - a

if b < A:
  print("Yes")
else:
  print("No")
print(b)

Submission status: Wrong Answer

Solution code:
N = int(input())
A = int(input())

a = 0
for i in range(20):
  if N > 500*i:
    a + 500
  else:
    continue
    
b = N - a

if b <= A:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
print('YNeos'[(int(input())%500)<=int(input())::2])

Submission status: Wrong Answer

Solution code:
N = int(input())
A = int(input())

#500円だけで払えない余り
amari = N % 500

#余りより1円玉の枚数が多ければ良い
if A >= amari :
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

Solution code:
n = input()
a = int(input())
si = int(n[-2:])

if si > a:
    print('No')
else:
    print('Yes')

Submission status: Wrong Answer

Solution code:
N = int(input())
A = int(input())

N = N - (N%500)*500
if N > A:
  r = 'No'
else:
  r = 'Yes'

print(r)

Submission status: Wrong Answer

Solution code:
n=int(input())
a=int(input())
m=n%500-a
if a<=0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
n=int(input())
a=int(input())
m=n%500-a
if a<0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
n=int(input())
a=int(input())
m=n%500-a
if a<0:
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

Solution code:
a = int(input())
b = int(input())
if a//500 <= b :
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
import sys

if (int(input()) % 500) <= int(input()):
  print('YES')
else:
  print('NO')

Submission status: Wrong Answer

Solution code:
import sys

to_pay = None
number_of_yen = None

lines = []
while True:
  try:
    line = input()
  except EOFError:
    break
    
  if line:
    lines.append(line)
  else:
    break
number_of_yen = int(lines.pop())
to_pay = int(lines.pop())

if to_pay % 500 <= number_of_yen:
  print('YES')
else:
  print('NO')

Submission status: Wrong Answer

Solution code:
import sys

to_pay = None
number_of_yen = None

lines = []
while True:
  try:
    line = input()
  except EOFError:
    break
    
  if line:
    lines.append(line)
  else:
    break
number_of_yen = int(lines.pop())
to_pay = int(lines.pop())

if (to_pay % 500) <= number_of_yen:
  print('YES')
else:
  print('NO')

Submission status: Wrong Answer

Solution code:
import sys

to_pay = None
number_of_yen = None

lines = []
while True:
  try:
    line = input()
  except EOFError:
    break
    
  if line:
    lines.append(line)
  else:
    break
number_of_yen = int(lines.pop())
to_pay = int(lines.pop())

if (to_pay % 500) < number_of_yen:
  print('YES')
else:
  print('NO')

Submission status: Wrong Answer

Solution code:
import sys

to_pay = None
number_of_yen = None

lines = []
while True:
  try:
    line = input()
  except EOFError:
    break
    
  if line:
    lines.append(line)
  else:
    break
number_of_yen = int(lines.pop())
to_pay = int(lines.pop())

if (to_pay - number_of_yen) % 500 is 0:
  print('YES')
else:
  print('NO')

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline
N = int(input())
A = int(input())
if A-N//500 < 0:
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

Solution code:
N = int(input())
A = int(input())


if N % 500 < A:
    print('Yes')

else:
    print('No')

Submission status: Wrong Answer

Solution code:
N = int(input())
A = int(input())


if N % 500 <  A:
    print('Yes')

else:
    print('No')

Submission status: Wrong Answer

Solution code:
N = int(input())
A = int(input())


if N % 500 <  A:
    print('YES')

else:
    print('NO')

Submission status: Wrong Answer

Solution code:
N=int(input())
A=int(input())
check=N-N%500
print("Yes" if check<=A else "No")

Submission status: Wrong Answer

Solution code:
N=int(input())
A=int(input())
n500=N//500
check=N-n500
print("Yes" if check<=A else "No")

Submission status: Wrong Answer

Solution code:
n = int(input())
a = int(input())

ans = "Yes" if n//500 <= a else "No"

Submission status: Wrong Answer

Solution code:
from sys import stdin
#stdin = open("input.txt")

if __name__ == "__main__":
    N = int(stdin.readline())
    A = int(stdin.readline())
    
    if N%500 > A:
        print("NO")
    else:
        print("YES")

Submission status: Wrong Answer

Solution code:
import sys

n, a = map(int, sys.stdin.read().split())

def main():
    return 'Yes' if a > n % 500 else 'No'

if __name__ == '__main__':
    ans = main()
    print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())
a=int(input())
if n%500+a>=n :
  print("Yes")
else :
  print("No")