Harryxun/stf_run huggingface dataset:
N = input()
Nnum = int(N)
Nls = list(N)
FN = sum(Nls)
if Nnum%FN == 0:
  print('Yes')
else:
  print('No')

### FIXED CODE ###

N = input()
Nnum = int(N)
Nls = list(N)
Nls = [int(i) for i in Nls]
FN = sum(Nls)
if Nnum%FN == 0:
  print('Yes')
else:
  print('No')
def dfs(hands, pair):
    hands.sort()

    if not hands:
        return True
    target = hands[0]
    # sequence
    if all(map(lambda x: x in hands, range(target, target + 3))):
        for i in range(target, target + 3):
            hands.remove(i)
        if dfs(hands, pair):
            return True
        for i in range(target, target + 3):
            hands.append(i)
    # triple
    if hands.count(target) >= 3:
        for i in range(3):
            hands.remove(target)
        if dfs(hands, pair):
            return True
        for i in range(3):
            hands.append(target)
    # pair
    if not pair and hands.count(target) >= 2:
        for i in range(2):
            hands.remove(target)
        if dfs(hands, True):
            return True
        for i in range(2):
            hands.append(target)
    return False

for line in filter(lambda line: line.strip(), stdin.readlines()):
    result = []
    data = [int(ch) for ch in line.strip()]
    for num in filter(lambda x: data.count(x) < 4, range(1, 10)):
        data_cp = list(data)
        data_cp.append(num)
        data_cp.sort()
        if dfs(data_cp, False):
            result.append(num)
    print " ".join(result)

### FIXED CODE ###

import sys

def dfs(hands, pair):
    hands.sort()

    if not hands:
        return True
    target = hands[0]
    # sequence
    if all(map(lambda x: x in hands, range(target, target + 3))):
        for i in range(target, target + 3):
            hands.remove(i)
        if dfs(hands, pair):
            return True
        for i in range(target, target + 3):
            hands.append(i)
    # triple
    if hands.count(target) >= 3:
        for i in range(3):
            hands.remove(target)
        if dfs(hands, pair):
            return True
        for i in range(3):
            hands.append(target)
    # pair
    if not pair and hands.count(target) >= 2:
        for i in range(2):
            hands.remove(target)
        if dfs(hands, True):
            return True
        for i in range(2):
            hands.append(target)
    return False

for line in filter(lambda line: line.strip(), sys.stdin.readlines()):
    result = []
    data = [int(ch) for ch in line.strip()]
    for num in filter(lambda x: data.count(x) < 4, range(1, 10)):
        data_cp = list(data)
        data_cp.append(num)
        data_cp.sort()
        if dfs(data_cp, False):
            result.append(num)
    if result:
        print " ".join(map(str, result))
    else:
        print 0
n, k = map(int, input().split())
h = [int(input()) for _ in range(n)]
ans = 0
for i in h:
    for i >= k:
        ans += 1
print(ans)

### FIXED CODE ###

n, k = map(int, input().split())
h = [int(i) for i in input().split()]
ans = 0
for j in h:
    if j >= k:
        ans += 1
print(ans)
N, K = input().split()
N = int(N)
K = int(K)
S = input()
A = []
for i in range(len(S)-1):
    if (S[i]=="0" and S[i+1]=="1") or (S[i]=="1" and S[i+1]=="0"):
        A.append(i+1)
A.insert(0, 0)
A.append(N)
M = []
if S[0] == "0":
    if K > len(A)//2:
        K = len(A)//2
    M.append(A[K*2]-A[0])
    a = 1
    b = a + K*2 + 1
elif S[0] == "1":
    if K > (len(A)-1)//2:
        K = (len(A)-1)//2
    a = 0
    b = a + K*2 + 1
if S[-1] == "1":
    while b <= len(A):
        M.append(A[b]-A[a])
        a += 2
        b = a + K*2 + 1
elif S[-1] == "0":
    while b <= len(A)-1:
        M.append(A[b]-A[a])
        a += 2
        b = a + K*2 + 1
    M.append(A[-1]-A[-1-K*2])
print(max(M))

### FIXED CODE ###

N, K = input().split()
N = int(N)
K = int(K)
S = input()
A = []
for i in range(len(S)-1):
    if (S[i]=="0" and S[i+1]=="1") or (S[i]=="1" and S[i+1]=="0"):
        A.append(i+1)
A.insert(0, 0)
A.append(N)
M = []
if S == "0"*N:
    M.append(len(S))
elif S[0] == "0":
    if K > len(A)//2:
        K = len(A)//2
    M.append(A[K*2]-A[0])
    a = 1
    b = a + K*2 + 1
elif S[0] == "1":
    if K > (len(A)-1)//2:
        K = (len(A)-1)//2
    a = 0
    b = a + K*2 + 1
if S == "0"*N:
    pass
elif S[-1] == "1":
    while b <= len(A):
        M.append(A[b]-A[a])
        a += 2
        b = a + K*2 + 1
elif S[-1] == "0":
    while b <= len(A)-1:
        M.append(A[b]-A[a])
        a += 2
        b = a + K*2 + 1
    M.append(A[-1]-A[-1-K*2])
print(max(M))
N = int(input())
ans = [0] * (N - 1)
AB = []
for i in range(N-1):
    a,b = map(int,input().split())
    AB.append([a-1,b-1])
G = [list() for _ in range(N)]
for i in range(N-1):
    G[AB[i][1]].append([AB[i][0],i])
    G[AB[i][0]].append([AB[i][1],i])

def dfs(v,c = -1,p = -1):
    k = 1
    for i in range(len(G[v])):
        u = G[v][i][0];ei = G[v][i][1]
        if u == p:continue
        if k == c:
            k += 1
        ans[ei] = k
        k += 1
        dfs(u,ans[ei],v)
dfs(0)
mx = 0
for i in range(N):
    mx = max(mx,len(G[i]))
print(mx)
for i in range(N-1):
    print(ans[i])

### FIXED CODE ###

import sys
sys.setrecursionlimit(200000)
N = int(input())
ans = [0] * (N - 1)
AB = []
for i in range(N-1):
    a,b = map(int,input().split())
    AB.append([a-1,b-1])
G = [list() for _ in range(N)]
for i in range(N-1):
    G[AB[i][1]].append([AB[i][0],i])
    G[AB[i][0]].append([AB[i][1],i])

def dfs(v,c = -1,p = -1):
    k = 1
    for i in range(len(G[v])):
        u = G[v][i][0];ei = G[v][i][1]
        if u == p:continue
        if k == c:
            k += 1
        ans[ei] = k
        k += 1
        dfs(u,ans[ei],v)
dfs(0)
mx = 0
for i in range(N):
    mx = max(mx,len(G[i]))
print(mx)
for i in range(N-1):
    print(ans[i])
N=int(input())

ans=0
odd=[]
for i in range(1,N+1):
  if i%2!=0:
    odd.append(i)
    
if N  <104:
  pass
elif N=105:
  ans=1
else:
  ans=1
  for i in range(106,N+1):
    if i%2 !=0:
      tmp=0
      for j in odd:
        if i%j==0:
          tmp=+1
      if tmp==8:
        ans+=1
        
        
print(ans)

### FIXED CODE ###

N=int(input())
 
ans=0
odd=[]
for i in range(1,N+1):
  if i%2!=0:
    odd.append(i)
    
if N  <104:
  pass
else:
  for i in range(105,N+1):
    if i%2!=0:
      tmp=0
      for j in odd:
        if i%j==0:
          tmp+=1
      if tmp==8:
        ans+=1 
print(ans)
class UnionFind:
    Parents = None

    def __init__(self, N):
        self.Parents = [-1 for i in range(N + 1)]

    # Aがどのグループにいるのか調べる
    def root(self, A):
        if self.Parents[A] < 0:
            return A
        else:
            self.Parents[A] = self.root(self.Parents[A])
            return self.Parents[A]

    # Aが所属しているグループのサイズを返す
    def size(self, A):
        return -self.Parents[self.root(A)]

    # AとBをくっつける
    def Connect(self, A, B):
        if self.root(A) == self.root(B):
            return False
        if self.size(A) < self.size(B):
            self.Parents[B] += self.Parents[A]
            self.Parents[A] = B
        else:
            self.Parents[A] += self.Parents[B]
            self.Parents[B] = A
        return True


n, m = map(int, input().split())
a = [input().split() for i in range(m)]
a = [(int(i[0]), int(i[1])) for i in a]
ans = [int(n * (n - 1) / 2) for i in range(m)]
uni = UnionFind(n)

for i in range(1, m):
    A = a[-i][0]
    B = a[-i][1]

    if uni.root(A) != uni.root(B):
        ans[i] = ans[i-1] - uni.size(A) * uni.size(B)
        uni.Connect(A, B)
    else:
        ans[i] = ans[i-1]


for i in range(1, m+1):
    print(ans[-i])


### FIXED CODE ###

class UnionFind:
    Parents = None

    def __init__(self, N):
        self.Parents = [-1 for i in range(N + 1)]

    # Aがどのグループにいるのか調べる
    def root(self, A):
        if self.Parents[A] < 0:
            return A
        else:
            self.Parents[A] = self.root(self.Parents[A])
            return self.Parents[A]

    # Aが所属しているグループのサイズを返す
    def size(self, A):
        return -self.Parents[self.root(A)]

    # AとBをくっつける
    def Connect(self, A, B):
        if self.root(A) == self.root(B):
            return False
        if self.size(A) < self.size(B):
            self.Parents[self.root(B)] += self.Parents[self.root(A)]
            self.Parents[self.root(A)] = B
        else:
            self.Parents[self.root(A)] += self.Parents[self.root(B)]
            self.Parents[self.root(B)] = A
        return True


n, m = map(int, input().split())
a = [input().split() for i in range(m)]
a = [(int(i[0]), int(i[1])) for i in a]
ans = [int(n * (n - 1) / 2) for i in range(m)]
uni = UnionFind(n)

for i in range(m):
    if i == 0:
        continue
    A = a[-i][0]
    B = a[-i][1]

    if uni.root(A) != uni.root(B):
        ans[i] = ans[i-1] - uni.size(A) * uni.size(B)
        uni.Connect(A, B)
    else:
        ans[i] = ans[i-1]


for i in range(1, m+1):
    print(ans[-i])
N = int(input())
h = list(map(int,input().split()))

dp = [0] * 10010

dp[0] = 0
dp[1] = abs(h[1]-h[0])

for i in range(2,N):
    dp[i] = min(abs(h[i]-h[i-1])+dp[i-1],abs(h[i]-h[i-2])+dp[i-2]) 
    
print(dp[N-1])

### FIXED CODE ###

N = int(input())
h = list(map(int,input().split()))

dp = [0] * 100010

dp[0] = 0
dp[1] = abs(h[1]-h[0])

for i in range(2,N):
    dp[i] = min(abs(h[i]-h[i-1])+dp[i-1],abs(h[i]-h[i-2])+dp[i-2]) 
    
print(dp[N-1])
num_list = input()

temp = num_list[1] # temporarily save B
num_list[1] = num_list[0] # put A in B
num_list[0] = temp # put B in A

temp = num_list[0] # temporarily save A
num_list[0] = num_list[2] # put C in A
num_list[2] = temp # put A in C

print(num_list)

### FIXED CODE ###

num_list = input()
num_list = num_list.split(' ')

temp = num_list[1] # temporarily save B
num_list[1] = num_list[0] # put A in B
num_list[0] = temp # put B in A
 
temp = num_list[0] # temporarily save A
num_list[0] = num_list[2] # put C in A
num_list[2] = temp # put A in C
 
print(' '.join(num_list))
N,K=map(int,input().split())

S=[[]for i in range(10**1+1)]
for i in range(N):
    a,b=map(int,input().split())
    S[a].append(b)
S.sort(reverse=True)
#print(S)

k=0
o=0
E=[]
for i in range(len(S)):
    if S[i]==[]:
        break
    else:
        k+=1
        o+=S[i][0]
        E.append(S[i][0])
        del S[i][0]
E.sort()
#print(S)
S.sort(reverse=True)
A=[]
if k>K:
    for i in range(k-K):
        A.append(E[i])
        o-=E[i]
    for i in range(k-K):
        del E[i]
        k-=1

for i in range(len(S)):
    if S[i]==[]:
        break
    else:
        for j in range(len(S[i])):
            A.append(S[i][j])
A.sort(reverse=True)
#print(A)
if K-k>0:
    for i in range(K-k):
        o+=A[i]
        #print(i)
    del A[:i+1]
    print(A)
    print(E)
for i in range(min(K,len(A))):
    if k*k+o<(k-1)**2+o-E[i]+A[i]:
        k=(k-1)
        o=o-E[i]+A[i]
    else:
        break
print(k*k+o)

### FIXED CODE ###

Num,K=map(int,input().split())
L=[[]for i in range(Num+1)]
for i in range(Num):
    t,d=map(int,input().split())
    L[t].append(d)
for i in range(1,Num+1):
    L[i].sort(reverse=True)

M=[]
m=[]
for i in range(1,Num+1):
    if len(L[i])>=1:
        M.append(L[i][0])
        if len(L[i])>=2:
            for j in range(1,len(L[i])):
                m.append(L[i][j])
M.sort(reverse=True)
m.sort(reverse=True)
MM=[0]
for i in range(len(M)):
    MM.append(MM[-1]+M[i])
mm=[0]
for i in range(len(m)):
    mm.append(mm[-1]+m[i])
#print(MM)
#print(mm)
ANS=0

def cmb(n, r, mod):
    if ( r<0 or r>n ):
        return 0
    r = min(r, n-r)
    return g1[n] * g2[r] * g2[n-r] % mod

mod = 10**9+7 #出力の制限
N = 10**5+10
g1 = [1, 1] # 元テーブル
g2 = [1, 1] #逆元テーブル
inverse = [0, 1] #逆元テーブル計算用テーブル

for i in range( 2, N + 1 ):
    g1.append( ( g1[-1] * i ) % mod )
    inverse.append( ( -inverse[mod % i] * (mod//i) ) % mod )
    g2.append( (g2[-1] * inverse[-1]) % mod )

for i in range(1,min(K,len(M))+1):
    ANS=max(i*i+MM[i]+mm[min(len(mm)-1,K-i)],ANS)
    #print(ANS,i)
print(ANS)
n=int(input())
a=list(map(int, input().split()))
top = 1
item = 1
below = []
belows = 1
for i in a:
  top *= i
for num in range(len(a))
  for _, j in enumerate(a):
    if _ != num:
    	item *= j
  below.append(item)
for b in below:
  belows += b
print(top/belows)

### FIXED CODE ###

n=int(input())
a=list(map(int, input().split()))
top = 1
item = 1
below = []
belows = 0
for i in a:
  top *= i
for num in range(len(a)):
  for _, j in enumerate(a):
    if _ != num:
    	item *= j
  below.append(item)
  item = 1
for b in below:
  belows += b
ans = top/belows
print(ans)
n=int(input())
A=[int(i) for i in input().split()]

A.sort()
A.append(-1)

dat={i:False for i in range(2*10**5+1)}

ans=0
for i in range(len(A)-1):
    if dat[A[i]]:
        pass
    else:
        if A[i]!=A[i+1]:
            ans+=1
        for i in range(A[i],20**5+1,A[i]):
            dat[i]=True

print(ans)

### FIXED CODE ###

n=int(input())
A=[int(i) for i in input().split()]

A.sort()
A.append(-1)

dat={i:False for i in range(10**6+10)}

ans=0
for i in range(len(A)-1):
    if dat[A[i]]:
        pass
    else:
        if A[i]!=A[i+1]:
            ans+=1
        for i in range(A[i],10**6+10,A[i]):
            dat[i]=True

print(ans)
from math import inf
import sys
def get_array(): return list(map(int , sys.stdin.readline().strip().split()))
def get_ints(): return map(int, sys.stdin.readline().strip().split())
def input(): return sys.stdin.readline().strip()
n,k=get_ints()
h=get_array()
li=[99999]*n
li[0]=0

li[1]=abs(h[1]-h[0])
for i in range(2,n):
    for j in range(i-1,(i-k)-1,-1):
        if j<0:
            break

            #3print(i,j)
        li[i]=min(li[i],li[j]+abs(h[i]-h[j]))
##print(li)
print(li[n-1])


### FIXED CODE ###


n=int(input())
h=list(map(int,input().split()))
li=[0]*n
li[1]=abs(h[1]-h[0])
for i in range(2,n):
    li[i]=min(li[i-1]+abs(h[i]-h[i-1]),li[i-2]+abs(h[i]-h[i-2]))
##print(li)
print(li[n-1])
s = input()
s.split(' ')

n = int(s[0])
a = int(s[2])
b = int(s[4])

train = n * a
taxi = b

if(taxi < train):
    print(taxi)
else:
    print(train)

### FIXED CODE ###

s = input()
l = s.split(" ")

n = int(l[0])
a = int(l[1])
b = int(l[2])
#print(l)
train = n * a
taxi = b

if(taxi < train):
    print(taxi)
else:
    print(train)
import sys
from collections import deque
from collections import defaultdict

H, W,M = map(int, input().split())
h = [0] * M
w = [0] * M
for i in range(M):
    x, y = map(int, input().split())
    w[x-1] += 1
    h[y-1] += 1

w_max = max(w)
h_max = max(h)

print(w_max+h_max-1)

### FIXED CODE ###

import sys


H, W, M = map(int, input().split())
bomb = [tuple(map(lambda x: int(x) - 1, s.split())) for s in sys.stdin.readlines()]
X = [0] * H  # X:各行の爆破対象の個数
Y = [0] * W  # Y:各列の爆破対象の個数
for h, w in bomb:
    X[h] += 1
    Y[w] += 1
maxX = max(X)
maxY = max(Y)

R = [h for h, x in enumerate(X) if x == maxX]  # R:爆破対象の数が最大となる行の番号
C = [w for w, y in enumerate(Y) if y == maxY]  # C:爆破対象の数が最大となる列の番号

bomb = set(bomb)
for r in R:
    for c in C:
        # (r, c)に爆破対象が存在しないとき, maxX + maxY が答えとなることが確定するため, 
        # 即座に探索を終了する.
        if (r, c) not in bomb:
            print(maxX + maxY)
            exit()
print(maxX + maxY - 1)
l,r,d=map(int、input())
print(r//d - l//d)

### FIXED CODE ###

l,r,d = map(int, input().split())
print(r//d-(l-1)//d)
n,q = map(int,input().split())
s = input()
lr = [list(map(int,input().split())) for i in range(q)]

aclist = [0]
acsum = 0

for i in range(1,n):
    if s[i-1] == "A" and s[i] == "C":
        acsum += 1
    aclist.append(acsum)

for i in range(q):
    ans = aclist [lr[i][1]-1] - aclist [lr[i][0]-2]
    if aclist [lr[i][0]-1] - aclist [lr[i][0]-2] != 0:
        ans -= 1
    print(ans)

### FIXED CODE ###

b = input()

if b == "A":
    ans = "T"
elif b == "T":
    ans = "A"
elif b == "C":
    ans = "G"
else:
    ans = "C"

print(ans)
n,k=map(int,input().split())
A=list(map(int,input().split()))
B=[]
C=[]
D=[]
for i in A:
  C.append((1+i)/2)
  B.append(sum(C))
for i in range(k,n):
  D.append(B[i]-B[i-k])
print(max(D))

### FIXED CODE ###

n,k=map(int,input().split())
p = [(int(s)+1)/2 for s in input().split()]
l = [sum(p[:k])]
for i in range(n-k):
  l.append(l[i]-p[i]+p[i+k])
print(max(l))
import collections
from pprint import pprint as pp

N,M = tuple(map(int, input().split()))
LRD = collections.defaultdict(list)
Lset = set()
Rset = set()
for _ in range(M):
  l,r,d = map(int, input().split())
  l -= 1
  r -= 1
  LRD[l].append((r,d))
  Lset.add(l)
  Rset.add(r)

n = [ None for _ in range(N) ]

def func(l):
  lst = LRD.pop(l,[])
  for r,d in lst:
    if n[l] != None:
      d2 = n[l] + d
    else:
      n[l] = 0
      d2 = d
    if n[r] not in (d2, None):
      return True
    n[r] = d2
    if r in LRD:
      if func(r):
        return True
  return False

def func2():
  lst = Lset-Rset
  for l in lst:
    n[l] = 0
  for l in lst:
    if l in LRD:
      if func(l):
        return True
  lst = tuple(LRD.keys())
  for l in lst:
    if l in LRD:
      if func(l):
        return True
  return False

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


### FIXED CODE ###

import collections
from pprint import pprint as pp

N,M = tuple(map(int, input().split()))
LRD = collections.defaultdict(list)
Lset = set()
Rset = set()
for _ in range(M):
  l,r,d = map(int, input().split())
  l -= 1
  r -= 1
  LRD[l].append((r,d))
  Lset.add(l)
  Rset.add(r)

n = [ None for _ in range(N) ]

deq = collections.deque()

def func(l):
  lst = LRD.pop(l,[])
  for r,d in lst:
    if n[l] != None:
      d2 = n[l] + d
    else:
      n[l] = 0
      d2 = d
    if n[r] not in (d2, None):
      return True
    n[r] = d2
    deq.append(r)
  return False

def func2():
  lst = Lset-Rset
  for l in lst:
    n[l] = 0
    deq.append(l)
  while deq:
    l = deq.popleft()
    if l in LRD:
      if func(l):
        return True
  deq.extend(LRD.keys())
  while deq:
    l = deq.popleft()
    if l in LRD:
      if func(l):
        return True
  return False

if func2():
  print('No')
else:
  print('Yes')
K, X = map(int, input().split())
list =[]
for i in range(X - K + 1, X + K):
    x.append(i)
print(list)

### FIXED CODE ###

K, X = map(int, input().split())
for i in range(X - K + 1, X + K):
    print(i, end = ' ')
N, K = map(int, input().split())
A = list(map(int, input().split()))

remain = [''] * (N+1) # 一番後ろは番兵
d = {}
for i, a in enumerate(A[::-1]):
  j = N - 1 - i
  if a in d:
    idx = d[a][-1]
    remain[j] = remain[idx+1]
    d[a].append(j)
  else:
    remain[j] = str(a) + ' ' + remain[j+1]
    d[a] = [j]

cands = []
idx = 0
for k in range(1, K+1):
  S = remain[idx]
  cands.append(S)
  if S == '':
    break
  s = int(S.split()[0])
  idx = d[s][-1] + 1

K = K % k
print(cands[K-1])

### FIXED CODE ###

N, K = map(int, input().split())
A = list(map(int, input().split()))

first = [0] * (N+1)
follow_idx = [-1] * (N+1)
d = {}
for i, a in enumerate(A[::-1]):
  j = N - 1 - i
  if a in d:
    idx = d[a][-1]
    d[a].append(j)
    if first[idx + 1] < 0:
      first[j] = first[idx + 1]
      follow_idx[j] = follow_idx[idx + 1]
    else:
      first[j] = -first[idx + 1]
      follow_idx[j] = idx + 1
  else:
    first[j] = a
    d[a] = [j]
    follow_idx[j] = j + 1


indices = [-1]
s0 = first[0]
if s0 >= 0:
  indices.append(0)
else:
  s0 = -s0
  indices.append(follow_idx[0])
    
if s0 == 0:
  print('')
  quit()

d2 = {0:0, s0:1}
for k in range(2, K+1):
  idx = d[s0][-1] + 1
  s0 = first[idx]
  if s0 >= 0:
    indices.append(idx)
  else:
    s0 = -s0
    indices.append(follow_idx[idx])
  if s0 in d2:
    break
  d2[s0] = k

if len(indices) < K:
  K = d2[s0] + (K - d2[s0]) % (k - d2[s0])

if K == 0:
  print('')
  quit()

ans = []
idx = indices[K]
while idx < N:
  s = first[idx]
  if s > 0:
    ans.append(s)
  idx = follow_idx[idx]

print(*ans)
from collections import deque
N,Q= map(int, input().split())
tree = [[] for _ in range(N)]
counter = [0]*N
visited = [False]*N
q = deque([0])

for i in range(N-1):
    a,b = map(int, input().split())
    tree[a-1].append(b-1)
    tree[b-1].append(a-1)

for i in range(Q):
    p,x = map(int, input().split())
    counter[p-1] += x

while q:
    parent = q.popleft()
    visited[parent] = True
    for child in tree[parent]:
        if visited[child]:
            continue
        counter[child] += counter[parent]
        q.append(child)
print(*counter)

### FIXED CODE ###

a = int(input())
s = input()
print('red' if a<3200 else s)
a, b, c = [input(i) for i in input().split()]

total = 0
for a in range(a, b + 1):
    
    a == c % d 
    if a == 0:
    total += 1

print(total)

### FIXED CODE ###

a, b, c = [int(i) for i in input().split()]

total = 0
for d in range(a, b + 1):
    
    if c % d == 0:
        total += 1

print(total)
print((lambda x:(int(x[1])+(100*(10 - 10 if x[0]>=10 else x[0]))))(input().split()))

### FIXED CODE ###

print((lambda x:(int(x[1])+(100*(10 - (10 if int(x[0])>=10 else int(x[0]))))))(input().split()))
def main():
    a, b = map(int, input().split())

    h = 0
    for i in range(1, 1000):
        h += i

        if (h - old_h) == (b - a):
            print(h - b)
            exit()

        old_h = h

if __name__ == "__main__":
    main()


### FIXED CODE ###

def main():
    a, b = map(int, input().split())

    h = 0
    ans = 0
    for i in range(1, 1000):
        h += i

        if h > b:
            b_h = h - b
            if a_h == b_h:
                ans = b_h
                break
        if h > a:
            a_h = h - a

    print(ans)


if __name__ == "__main__":
    main()
import math

r = int(raw_input())
print " ".join(map(str, ([float(r)**2 * math.pi, float(r) * 2 * math.pi]))

### FIXED CODE ###

import math
import sys

r = float(raw_input())
print str('%.5f' % (r**2 * math.pi)) + " " + str('%.5f' % (r * 2 * math.pi))
sys.exit()
import re
s = input()
print("A%sC" % re.match('AtCoder (.).* Contest', s)[1])

### FIXED CODE ###

a,b,x = map(int, input().split())
print(b // x - (a - 1) // x)
x1, y1, x2, y2 = map(int, input().split())
print(x2+(y1-y2),y2+(x2-x1),x1+(y1-y2),y1+(x2-x1))

### FIXED CODE ###

n = int(input())
list_w = [input() for i in range(n)]
list_ok = [list_w[0]]

if len(list_w) != len(set(list_w)):
    print("No")

else:
    for i in range(1, n):
        if list_w[i - 1][-1] == list_w[i][0]:
            list_ok.append(list_w[i])
            i += 1
    if len(list_ok) == len(list_w):
        print("Yes")
    else:
        print("No")
h,w = map(int,input().split())
a = []
for i in range(h):
    ai = list(map(int,input().split()))
    a.append(ai)
ans = []
for i in range(h):
    for j in range(w-1):
        if a[i][j] % 2 == 1:
            ans.append([i+1,j+1,i+1,j+2])
            a[i][j+1] += 1
for i in range(h-1):
    if a[-1][i] % 2 == 1:
        ans.append([i+1,w,i+2,w])
        a[-1][i+1] += 1
print(len(ans))
for i,j,k,l in ans:
    print(i,j,k,l)

### FIXED CODE ###

h,w = map(int,input().split())
a = []
for i in range(h):
    ai = list(map(int,input().split()))
    a.append(ai)
ans = []
for i in range(h):
    for j in range(w-1):
        if a[i][j] % 2 == 1:
            ans.append([i+1,j+1,i+1,j+2])
            a[i][j+1] += 1
for i in range(h-1):
    if a[i][-1] % 2 == 1:
        ans.append([i+1,w,i+2,w])
        a[i+1][-1] += 1
print(len(ans))
for i,j,k,l in ans:
    print(i,j,k,l)