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

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

Submission status: Wrong Answer

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





for i in range(A):
    Z = N - i
    if Z % 500 == 0:
        print("Yes")
        exit()
        
print("No")

Submission status: Wrong Answer

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

for i in range(n):
    for j in range(n):
        if 500 * j + i == a:
            print("Yes")
            exit(0)

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
for i in range(A):
    if i == a:
        print('Yes')
        exit()

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 //= 500
print("Yes" if N <= A else "No")

Submission status: Wrong Answer

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

amari = 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' , flush=True)
else:
    print('No' , flush=True)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
a = int(input())
print("Yes" if n < a or (n - a) % 500 == 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:
N = int(input("N--->"))
A = int(input("A--->"))

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%500

if a > b:
    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())
s=n%500
if s<=a:
  print("Yes")
else:
  print("NO")

Submission status: Wrong Answer

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

nokori = N % 500

if nokori <= A:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-

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

remainder = N % 500
if A>  remainder:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
import sys
n = int(input())
a = int(input())
b = 0
while True:
    c = 0
    if (500*b + c) > n:
        print("NO")
        break
    for i in range(a+1):
        if (500*b + c) == n:
            print("YES")
            sys.exit(0)
        c+=1
    b+=1

Submission status: Wrong Answer

Solution code:
import sys
n = int(input())
a = int(input())
b = 0
c = 0
while True:
    if (500*b + c) > n:
        print("NO")
        break
    for i in range(a+1):
        if (500*b + i) == n:
            print("YES")
            sys.exit(0)
    b+=1

Submission status: Wrong Answer

Solution code:
n = int(input())
a = int(input())
b = 0
while True:
    if (500*b + a) > n:
        print("NO")
        break

    if (500*b + a) - n == 0:
        print("YES")
        break

    b+=1

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
A = int(input())
ret = 'No'
for a in range(A):
  if N%500==a:
    ret='Yes'
    break
print(ret)

Submission status: Wrong Answer

Solution code:
a=int(input())
b=int(input())
if a%500 <b:
  print("No")
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:
a=int(input())
b=int(input())
if a%500 > b:
  print("NO")
else:
  print("YES")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

temp = n%500
if temp<=a:
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

num_list = [a for a in range(A+1)]

if N%500 in num_list:
    print('Yse')
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 = list(map(int, input().split()))
b = sorted(a, reverse=True)

print(sum(b[0::2]) - sum(b[1::2]))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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','No'][(n-a)%500>0])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

z = int(n%500)

if a == z:
  print('Yes')
  
else:
  print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
A = int(input())
flag=0
for i in range(10000):
    for j in range(A):
        if N==500*i+j:
            flag=1
if flag==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())
mod=N%500
if mod<A:
  print('Yes')
else:
  print('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:
n,s = int(raw_input()),map(int,raw_input().split())
s.sort(key = lambda x:-x)
print sum(s[0:n:2]) - sum(s[1:n:2])

Submission status: Wrong Answer

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

max_B = 10000//500

boolian = False

for b in range(max_B+1):
    if boolian == True:
        break
    for a in range(A+1):
        someone = 500*b + a 
        if someone == N:
            boolian = True
            break
        if someone != N:
            boolian = False
            continue
            
if boolian == True:
    print('YES')
if boolian == False:
    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())
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())

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:
import sys
N=int(input())
A=int(input())
if A==0:
    print('No')
    sys.exit()
if (N+A)//500>=1:
    print('Yes')

Submission status: Wrong Answer

Solution code:
import sys
N=int(input())
A=int(input())
if A==0:
    print('No')
    sys.exit()
if (N+A)//500>=1:
    print((N+A)//500)
    print('Yes')

Submission status: Wrong Answer

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

if(N%5 <= 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,A = map(int, open(0).read().split())
print('Yes' if N % 500 < A else 'No')

Submission status: Wrong Answer

Solution code:
N=int(input())
A=int(input())
for i in range(A+1):
    for j in range(21):
        if 500*j+i==N:
            print("YES")
            exit()
print("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:
n = int(input())
a = int(input())
print(n)
mod = n % 500
if mod < a:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
import sys
def input(): return sys.stdin.readline().strip()


def main():
    n = int(input())
    a = int(input())
    val = n // 500
    if val <= a: print("Yes")
    else: print("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:
n = int(input())
a = int(input())
if a >= n:
    print("Yes")
while 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 a >= n:
    print("Yes")
while 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 a >= 500:
    print("Yes")
while 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 > 500:
    n -= 500

if n <= a:
    print('Yes')
elif n == 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 <= a:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
def s(): return input()
def k(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def X(): return list(input())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
def gcd(*numbers): reduce(math.gcd, numbers)
sys.setrecursionlimit(10 ** 9)
mod = 10**9+7
count = 0
ans = 0

N = k()
A = k()

x = N % 5
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:
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:
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:
  print("YES")
elif a%500==0:
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

Solution code:
int_list = [int(input()) for i in range(2)]
if int_list[0] % 500 <= int_list[1]:
    print("yes")
else:
    print("no")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
int_list = [int(input()) for i in range(2)]
if int_list[0] % 500 < int_list[1]:
    print("yes")
else:
    print("no")

Submission status: Wrong Answer

Solution code:
# coding: utf-8

N = input()
A = input()

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

flag = 0

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

Submission status: Wrong Answer

Solution code:
N = int(input())
a = list(map(int, input().split()))

a.sort(reverse=True)

result = sum(a[::2]) - sum(a[1::2])

print(result)

Submission status: Wrong Answer

Solution code:
N,A = map(int,open(0))
print("YES" if A>=(N%500) else "NO")

Submission status: Wrong Answer

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

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

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

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

res = n % 500

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

Submission status: Wrong Answer

Solution code:
N = int(input())
A = int(input())
n=N%500
s=False
if A==0 and N%500==0:
    s=True

for i in range(1,A+1):
    if n==i:
        s=True
        break
        
if s:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
N = int(input())
A = int(input())
n=N%500
s=False
for i in range(1,A+1):
    if n==i:
        s=True
        break
        
if s:
    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:
  N -= 500
if N <= 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:
N = int(input())
A = int(input())
while N > 500:
  N -= 500
  print(N)
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("Np")

Submission status: Wrong Answer

Solution code:
n = int(input())
a = list(map(int, input().split()))
a = sorted(a, reverse=True)
Alice = 0
Bob = 0
for i in range(0, len(a), 2):
    Alice += a[i]
    if i + 1 < len(a):
        Bob += a[i + 1]
print(Alice - Bob)

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,a=map(int,open(0));print('NYoe s'[n//500<=a::2])

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

if n%500>a:
    print("NO")
else:
    print("YES")

Submission status: Wrong Answer

Solution code:
N = int(input())
A =[i for i in map(int,input().split())]
A = sorted(A,reverse=True)
Alice = 0
Bob = 0
while len(A) != 0:
    Alice += int(A.pop(0))
    if len(A) == 0:
        break
    else:
        Bob += int(A.pop(0))

print(Alice - Bob)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def main():
    target_num = input()
    target_list = list(map(int, input().split()))

    target_list.sort(reverse=True)

    result_a = 0
    result_b = 0
    a_flg = True
    for target in target_list:
        if a_flg:
            result_a += int(target)
            a_flg = False
        else:
            result_b += int(target)
            a_flg = True

    print(result_a - result_b)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

s=N//500

for i in range(A):
    if i+s*500==N:
        print("Yes")
        exit()

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())
print("Yes" if N//500 <= A else "No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
N,A=int(input()),int(input())
while N > 500: N-=500
print('Yes' if N<A 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:
N = int(input())
A = int(input())

_, m = divmod(N, 500)

print('Yes' if m < A else 'No')

Submission status: Wrong Answer

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

x = N % 500

s = N - (500*x)

if s - A <= 0:
    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*i == 0:
        print('Yes')
        break
    elif N - 500*i < 0:
        N = N - 500*(i - 1)
        break

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

Submission status: Wrong Answer

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



for i in range(1, 100):
    if N - 500*i == 0:
        print('Yes')
        break
    elif N - 500*i < 0:
        N = N - 500*(i - 1)
        break

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

Submission status: Wrong Answer

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

total = N

for i in range(1, 100):
    if total - 500*i == 0:
        print('Yes')
        break
    elif total - 500*i < 0:
        total = total - 500*(i - 1)
        break

        
if total - A > 0:
    print('No')
else:
  print('Yes')

Submission status: Wrong Answer

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

total = N

for i in range(1, 100):
    if total - 500*i == 0:
        print('Yes')
        break
    elif total - 500*i < 0:
        total = total - 500*(i - 1)
        break

        
if total - A > 0:
    print('No')
else:
    for j in range(A + 1):
        total = total - 1
        if total == 0:
            print('Yes')
            break

Submission status: Wrong Answer

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

total = N

for i in range(1, 10000):
    if total - 500*i == 0:
        print('Yes')
        break
    elif total - 500*i < 0:
        total = total - 500*(i - 1)
        break

        
if total - A > 0:
    print('No')
else:
    for j in range(A):
        total = total - 1
        if total == 0:
            print('Yes')
            break

Submission status: Wrong Answer

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

total = N

for i in range(1, 100):
    if total - 500*i == 0:
        print('Yes')
        break
    elif total - 500*i < 0:
        total = total - 500*(i - 1)
        break

        
if total - A > 0:
    print('No')
else:
    for j in range(A):
        total = total - 1
        if total == 0:
            print('Yes')
            break

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# 2問目類題２
N,A =[int(input()) for i in range(2)]
if 0 <= (N % 500) <= A:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
# 2問目類題２
N,A =[int(input()) for i in range(2)]
for k in range(1,A+1):
    if N % 500 == k:
        print("YES")
        exit()

print("NO")

Submission status: Wrong Answer

Solution code:
# 2問目類題２
N,A =[int(input()) for i in range(2)]
for k in range(1,A+1):
    if N % k == 0:
        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:
S = [int(input()) for i in range(2)]
N = S[0]
A = S[1]
s = N % 500 
if (A >= s):
  print("yes")
else:
  print("no")

Submission status: Wrong Answer

Solution code:
N = int(input())
A = int(input())
s = N % 500 
if (A >= s):
  print("yes")
else:
  print("no")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import sys
import itertools
sys.setrecursionlimit(1000000000)
from heapq import heapify,heappop,heappush,heappushpop

import collections

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

Submission status: Wrong Answer

Solution code:
#data = map(int,input().split())
data = [int(input()),int(input())]

if data[0] % 500 < data[1]:
    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 % 500 <= a:
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def resolve():
    # 整数 1 つ
    n = int(input())
    a = int(input())
    # 整数複数個
    # a, b, c = map(int, input().split())
    # 整数 N 個 (改行区切り)
    # N = [int(input()) for i in range(N)]
    # 整数 N 個 (スペース区切り)
    # N = list(map(int, input().split()))
    # 整数 (縦 H 横 W の行列)
    # A = [list(map(int, input().split())) for i in range(H)]

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


resolve()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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