X=int(eval(input()))

dp=[0]*(X+105)

dp[0]=1

for x in range(X):

    if dp[x]==1:

        for price in range(100,106):

            dp[x+price]=1

print((dp[X]))
X=int(eval(input()))

div=X//100

mod=X%100

print((1 if 5*div>=mod else 0))
X = int(eval(input()))
dp = [0] * (X + 105)
dp[0] = 1
for x in range(X):
    if dp[x] == 1:
        for price in range(100, 106):
            dp[x + price] = 1
print((dp[X]))

X = int(eval(input()))
div = X // 100
mod = X % 100
print((1 if 5 * div >= mod else 0))

-dp = [0] * (X + 105) -dp[0] = 1 -for x in range(X): -    if dp[x] == 1: -        for price in range(100, 106): -            dp[x + price] = 1 -print((dp[X])) +div = X // 100 +mod = X % 100 +print((1 if 5 * div >= mod else 0))