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:
a=int(input())
b=int(input())
if (a*500)<=b:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
from sys import stdin
n=int(stdin.readline().rstrip())
a=int(stdin.readline().rstrip())
if a>n%500:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
A = int(input())
print("Yes" if A//500<=A else "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())
if N//500 <= A:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N=int(input())#total
A=int(input())#1

#500*x+1*A=N
#x is undecided
a=N-1*A
#a can devided by 500?
if(N>A):    
    if(a%500==0):
        print("Yes")
    else:
        print("No")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
N=int(input())#total
A=int(input())#1

#500*x+1*A=N
#x is undecided
a=N-1*A
#a can devided by 500?
if(N>=A):    
    if(a%500==0):
        print("Yes")
    else:
        print("No")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
N=int(input())#total
A=int(input())#1

#500*x+1*A=N
#x is undecided
a=N-1*A
#a can devided by 500?
if(N>=A):    
    if(a%500==0):
        print("yes")
    else:
        print("No")
else:
    print("No")

Submission status: Wrong Answer

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

while N >= 500:
    N = N - 500

if A >= 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:
import sys
input = sys.stdin.readline

N = int(input())
deck = list(map(int, input().split()))
Alice = 0
Bob = 0

deck.sort(reverse=True)
for i, card in enumerate(deck):
    if i % 2 == 0:
        Alice += card
    else:
        Bob += card

print(Alice - Bob)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a = int(input())
b = int(input())
while a>500:
  a-=500
if b>=a:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

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

amari = N%500

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

Submission status: Wrong Answer

Solution code:
n=int(input())
a=int(input())
for i in range(a):
  if (n-i)%500==0:
    print("Yes")
    exit()
print("No")

Submission status: Wrong Answer

Solution code:
n=int(input())
a=int(input())
dif=n-a%100
if dif%100!=0:
  print("No")
  exit()
for i in range(int(a/100)):
  if (dif-i*100)%500==0:
    print("Yes")
    exit()
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())

while(N - 500 > 0):
  N = N - 500

if N <= A:
  print('Yes')
else:
  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:
# -*- coding: utf-8 -*-
N = int(input())
A = int(input())
ans = False
for x in range(A):
    if (N - x) % 500 == 0:
        ans = True
        print('Yes')
        break
    else:
        pass
if not ans:
    print('No')

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
N = int(input())
A = int(input())
ans = False
for x in range(A):
    if (N - x) % 500 == 0:
        ans = True
        print('Yes')
        break
    else:
        ans = False
if not ans:
    print('No')

Submission status: Wrong Answer

Solution code:
n = int(input())

a = list(input().split(" "))

alice = 0
bob = 0

a = sorted(a,reverse=True)
print(a)

for i in range(len(a) - 1):
    alice += int(a[i])
    bob += int(a[i+1])

print(alice - bob)

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 else 'No')

Submission status: Wrong Answer

Solution code:
n = int(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())
value = sorted(list(map(int,input().split())))[::-1]
print(sum(value[::2]) - sum(value[1::2]))

Submission status: Wrong Answer

Solution code:
import numpy as np
N = int(input())
value = sorted(list(map(int,input().split())),reverse=True)
print(np.sum(value[::2]) - np.sum(value[1::2]))

Submission status: Wrong Answer

Solution code:
import numpy as np
N = int(input())
value = np.sort(list(map(int,input().split())))[::-1]
print(np.sum(value[::2])-np.sum(value[1::2]))

Submission status: Wrong Answer

Solution code:
import numpy as np
N = int(input())
value = list(map(int,input().split()))
value=np.sort(value)[::-1]
a=0
b=0
a = np.sum(value[::2])
b = np.sum(value[1::2])
print(a-b)

Submission status: Wrong Answer

Solution code:
import numpy as np
N = int(input())
value = list(map(int,input().split()))
value=np.sort(value)[::-1]
print(N,value)
a=0
b=0
a = np.sum(value[::2])
b = np.sum(value[1::2])
print(a-b)

Submission status: Wrong Answer

Solution code:
import numpy as np
N = int(input())
value = list(map(int,input().split()))
value=np.sort(value)[::-1]
print(N,value)
a=0
b=0
a = np.sum(value[::2])
b = np.sum(value[1::2])
print(a,b)

Submission status: Wrong Answer

Solution code:
N = int(input())
A = int(input())
for i in range(0, N, 500):
    flag = 0
for j in range(A):
    i += 1
    if N == i:
        flag = 1
if flag == 1:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
s = [input() for i in range(2)]
s1 = int(s[0])%500
if s1 <= int(s[1]):
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
N = int(input())
A = int(input())
n = N
sub = n - 500 * (n//500)
if(A != 0 and sub <= A):
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
# coding: utf-8

N = input()
A = input()
G = N%500
if A>=G:
  print 'YES'
else:
  print 'NO'

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
n,a = [int(input()) for _ 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 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:
# Infinite Coins
print('Yes' if int(input())//500 <= int(input()) 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())

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 % 500 - a <= 0 else '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:
print'YNEOS'[input()%500>input()::2]

Submission status: Wrong Answer

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

while(N > 0):
    N -= 500

N += 500

flag = False
for i in range(A):
    if i == N: flag = True

if flag: print('Yes')
else: print('No')

Submission status: Wrong Answer

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

t = n % 500 - a

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

Submission status: Wrong Answer

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

amari = N % 500

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

Submission status: Wrong Answer

Solution code:
# coding: utf-8

N_yen = int(input())
A_1mai = int(input())

answer = 'YES' if N_yen % 500 <= A_1mai else 'NO'
print(answer)

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:
p=input;
print('YNeos'[int(p())//500>=int(p())::2])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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


if A >= N:
  print("Yes")
else:
  print("NO")

Submission status: Wrong Answer

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

ans = 'No'
for i in range(a):
    if (n-i)%500 == 0:
        ans = 'Yes'
        break
print(ans)

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 % 500 < A:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

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

V = N % 500

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

Submission status: Wrong Answer

Solution code:
n = int(input())
a = int(input())
n = n % 500 - a
print(["No", "Yes"][a <= 0])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

for i in range(A):
  if (N-i)%500 == 0:
    print('YES')
    FLG = 1
  break
    
if FLG == 0:
  print('NO')

Submission status: Wrong Answer

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

for i in range(A):
  if (N-i)%500 == 0:
    print('YES')
    FLG = 1
    break
    
if FLG == 0:
  print('NO')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
if int(input())%500<=int(input())%500: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")
if A < B:
    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:
a=int(input());b=int(input());print("Yneos"[a%500>b::2])

Submission status: Wrong Answer

Solution code:
a=int(input());b=int(input());print("Yneos"[a%500<b::2])

Submission status: Wrong Answer

Solution code:
N = int(input())
A = int(input())
for a in range(A+1):
    for j in range(21):
        if a + 500 * j:
            print("Yes")
            exit()
print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())
A = int(input())
for a in range(A):
    for j in range(20):
        if a + 500 * j:
            print("Yes")
            exit()
print("No")

Submission status: Wrong Answer

Solution code:
n = int(input()) 
ai = input().split()
ai = list(map(int, ai))

sorted_ai = sorted(ai, reverse=True)

alice = 0
bob = 0

for index, x in enumerate(sorted_ai):
    if (index % 2 == 0):
        alice += x
    else:
        bob += x
        
print(alice - bob)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N=int(input())
A=int(input())
for i in range(0,20):
  if N >= 500:
    N=N-500
  else:
    break
if(N<A):
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
N=int(input())
A=int(input())
for i in range(1,100):
  if N >= 500:
    N=N-500
  else:
    break
if(N<A):
  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 % 5) > A):
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

Solution code:
N = int(input())
A = int(input())
if ((N % 5) > 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())

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
# cook your dish here
n=int(input())	
a=int(input())	

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

Submission status: Wrong Answer

Solution code:
N = int(input())
A = int(input())
num = int(N/500)
res = N - 500*num
if A < res:
  print('False')
else:
  print('True')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n=int(input())
a=int(input())
print(['No','Yes'][n-(n//500)/(1/500)-a<0])

Submission status: Wrong Answer

Solution code:
a = int(input())
c = int(input())
b = 0
 
b = c % 500
if c >= b:
    print('Yes')
else:
    print("No")

Submission status: Wrong Answer

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

b = c % 500
if c >= b:
    print('YES')
else:
    print("NO")

Submission status: Wrong Answer

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

while n > 0:
  n -= 500

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

Submission status: Wrong Answer

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

while n < 0:
  n -= 500

n += 500
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())
a = int(input())
if (n % 500) >= a:
    print("NO")
else:
    print("YES")

Submission status: Wrong Answer

Solution code:
print(['Yes','No'][int(input())//500>int(input())])

Submission status: Wrong Answer

Solution code:
N=int(input())
A=int(input())
print("Yes" if A != 0 else "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:
print('YES' if int(input())%500<=int(input()) else 'NO')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import sys

number = int(input())
a = int(input())

if a >= 500:
  print("Yes")
  sys.exit()

for i in range(a):
  if number % 500 ==i:
    print("Yes")
    sys.exit()

print("No")

Submission status: Wrong Answer

Solution code:
print(['Yes','No'][int(input())%100>int(input())])

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
while True:
    N = int(input("N = "))
    A = int(input("A = "))
    if (N >= 1 and N <= 10000) and (A >= 0 and A <= 1000):
        break

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
if int(input()) % 500 < int(input()):
  print("no")
else:
  print("yes")

Submission status: Wrong Answer

Solution code:
pay = int(input(''))
yen1 = int(input(''))
amari = pay % 500
if yen1 >= amari:
  print('YES')
else:
  print('NO')

Submission status: Wrong Answer

Solution code:
pay = int(input(''))
yen1 = int(input(''))
amari = pay % 500
if yen1 >= amari:
  print('YES')
else:
  print('NO')

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
#整数の入力
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())
if((n % 500) < a):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = [int(input()) for n in range(2)]
if n[0] % 500 == n[1]:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
N = int(input())
lines = input().split(' ')
lines = [int(x) for x in lines]
a_list = sorted(lines)
A = 0
B = 0


while len(a_list) > 0:
	A += a_list.pop()
	if len(a_list) > 0:
		B += a_list.pop()

print(A - B)

Submission status: Wrong Answer

Solution code:
N=int(input())
A=int(input())
import sys
for i in range (1,1000):
    for j in range(A+1):
        if N==500*i+j:
            print ('Yes')
            sys.exit()

print ('No')

Submission status: Wrong Answer

Solution code:
N=(input())
A=(input())
N_list=list(N)
A_list=list(A)
N=int(N)
A=int(A)
    
if N-A<0:
    print("Yes")
elif N_list[len(N_list)-1]==A_list[len(A_list)-1] and N_list[len(N_list)-2]==A_list[len(A_list)-2]:
    print("Yes")
elif len(A_list)==1 and N_list[len(N_list)-1]==A_list[len(A_list)-1] and N_list[len(N_list)-2]=='0':
    print ('Yes')
else:
    print ("No")

Submission status: Wrong Answer

Solution code:
N=(input())
A=(input())
N_list=list(N)
A_list=list(A)
N=int(N)
A=int(A)
    
if N-A<0:
    print("Yes")
elif N_list[len(N_list)-1]==A_list[len(A_list)-1] and N_list[len(N_list)-2]==A_list[len(A_list)-2]:
    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-A<0:
    print("Yes")
elif (N-A)%100==0:
    print("Yes")
else:
    print ("No")

Submission status: Wrong Answer

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

if N-A<0:
    print("Yes")
elif (N-A)%500==0:
    print("Yes")
else:
    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:
from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"


def solve():
    N = int(input())
    A = int(input())

    return N / 500 <= A


def main():
    print(Yes if solve() else No)


if __name__ == '__main__':
    main()

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()) #N円
a = int(input()) #一円玉a枚

cal = n % 500 

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input()) % 500
print(['NO', 'YES'][int(input()) >= N])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n=int(input())
a=int(input())
b=int(n%500)
if a>b:
    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:
N = int(input("N:"))
A = int(input("A:"))
B = N - A
while B >= 0 and B - 500 >= 0 :
    B = B - 500
if B == 0 :
    print('Yes')
else :
    print('No')

Submission status: Wrong Answer

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

rest = n - a
if rest % 500:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
A = int(input())
a = N % 500
if a == 0:
    print("yes")
else:
    if a <= A:
        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 = input()
a = int(input())
print('Yes' if int(n[1:])-a<=0 else 'No')

Submission status: Wrong Answer

Solution code:
n = input()
a = int(input())
print('Yes' if int(n[1:])-a<0 else 'No')

Submission status: Wrong Answer

Solution code:
import numpy as np

N = input(); A= input()
A,N = int(A), int(N)

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

Submission status: Wrong Answer

Solution code:
print('Yes' if int(input())>=int(input())%500 else '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:
n=int(input())
a=int(input())
n = n % 500
if a <= n :
 print('Yes')
else :
 print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
a = []
for i in range(1):
    a.append(int(input()))

calc = N - a[0]

if a[0]>N:
    print('Yes')
else:
    print('Yes' if calc % 500 == 0 else '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())
if(N%500==0 or N%500-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())

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())

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

Submission status: Wrong Answer

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

x = n % 500
if a >= x:
    print('yes')
else:
    print('no')

Submission status: Wrong Answer

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

x = n % 500
if a >= x:
	print("yes")
else:
	print("no")

Submission status: Wrong Answer

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

x = n % 500
if x > 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:
payment = int(input())
coins = int(input())

if payment % 500 > coins:
    print('No')
else:
    print('yes')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
a = list(map(int, input().split()))
print(sum(sorted(a)[-1:-N:-2]) - sum(sorted(a)[-2:-N-1:-2]))

Submission status: Wrong Answer

Solution code:
N = int(input())
a = list(map(int, input().split()))
print(sum(sorted(a)[-1:0:-2]) - sum(sorted(a)[-2:0:-2]))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

mod = n % 500

if a >= mod:
    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:
a = int(input())
b = int(input())
c = a % 500
if a>=b:
  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:
N=int(input())
A=int(input())

amari = N % 500
if amari > A:
    print("no")
else:
    print("yes")

Submission status: Wrong Answer

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

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

rest = N % 500

if rest<=A:
    print("yes")

else:
    print("No")

Submission status: Wrong Answer

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

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

rest = N % 500

if rest<=A:
    print("yes")

else:print("No")

Submission status: Wrong Answer

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

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

print(ans)

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:
# -*- coding: utf-8 -*-
import numpy as np
# 整数の入力
n = int(raw_input())
# スペース区切りの整数の入力
a = np.array(map(int, raw_input().split()))
# Sort
a = np.sort(a)[::-1]
# Points
Alice = np.sum(a[::2])
Bob = np.sum(a[1::2])
# Print
print Alice - Bob

Submission status: Wrong Answer

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

if (money % 500) > A:
    print('NO')
else:
    print('YES')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
n = int(input())
l = list(map(int, input().split(' ')))

l.sort()
l.reverse()

result = 0

for e in enumerate(l):
    result += e[1] if e[0] % 2 == 0 else -e[1]

print(result)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# -*- coding:utf8 -*-
def t1(A, N):
    # 制約
    ## Nは1以上の10000以下の整数
    ## Aは0以上の1000以下の整数

    ### Aが整数かどうか判定
    if not (isinstance(A, int)):
        return ("No")

    ### Aは0以上の1000以下かチェック
    if not (0 <= A <= 1000):
        return ("No")

    ### Nが整数かどうか判定
    if not (isinstance(N, int)):
        return ("No")
    ### Nは1以上の10000以下かチェック
    if not (1 <= N <= 10000):
        return ("No")

    amari = N % 500

    if not amari:
        return ("Yes")

    if A >= amari:
        return ("Yes")
    else:
        return ("No")

loop_count = 0
input_list = []
while loop_count < 2:
    n = input()
    input_list.append(n)
    loop_count += 1
ichien = input_list[0]
goukei = input_list[1]
print (t1(ichien, goukei))

Submission status: Wrong Answer

Solution code:
a = input()
n = 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())

mod = N % 500

if  mod < 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:
n = int(input())
a = int(input())
if n % 500 < a:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
if __name__ == "__main__":
    n = int(raw_input())
    a = int(raw_input())

    if n % 500 > a:
        print "no"
    else:
        print "yes"

Submission status: Wrong Answer

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

N %= 500

if A > N:
    print('Yes')
else:
    print('No')