Harryxun/stf_run huggingface dataset:
import math
from functools import reduce

def lcm_base(x, y):
    return (x * y) // math.gcd(x, y)

def lcm(*numbers):
    return reduce(lcm_base, numbers, 1)

n = int(input())
t = [int(input()) for i in range(n)]

print(lcm(*t))

### FIXED CODE ###

import fractions
from functools import reduce
 
def lcm_base(x, y):
    return (x * y) // fractions.gcd(x, y)
 
def lcm(*numbers):
    return reduce(lcm_base, numbers, 1)
 
n = int(input())
t = [int(input()) for i in range(n)]
 
print(lcm(*t))
N = int(input())
sum = 0
for i in range(N+1):
  if(i % 3 != 0 and i % 5 != 0):
    sum += i
  
  if(i > )

### FIXED CODE ###

N = int(input())
sum = 0
for i in range(N+1):
  if(i % 3 != 0 and i % 5 != 0):
    sum += i

print(sum)
c_box = [] 
for i in range(3):
  c = list(map(int, input().split()))
  c_box.append(c)
  
for i in range(101):
  a1 = i
  b1 = c[0][0]-a1
  b2 = c[0][1]-a1
  b3 = c[0][2]-a1
  if c[1][0]-b1 == c[1][1]-b2 == c[1][2]-b3:
    if c[2][0]-b1 == c[2][1]-b2 == c[2][2]-b3:
      print('Yes')
      exit()
print('No')

### FIXED CODE ###

c = [] 
for i in range(3):
  box = list(map(int, input().split()))
  c.append(box)

  
for i in range(101):
  a1 = i
  b1 = c[0][0]-a1
  b2 = c[0][1]-a1
  b3 = c[0][2]-a1
  if c[1][0]-b1 == c[1][1]-b2 == c[1][2]-b3:
    if c[2][0]-b1 == c[2][1]-b2 == c[2][2]-b3:
      print('Yes')
      exit()
print('No')
print(list(set(int(input().split()))))

### FIXED CODE ###

print(len(set(input().split())))
N = int(input())
S = input()
key = 0

if N = 1:
  key += 1
else:
  for i in range(N//2):
  if S[i] != S[(N//2)+i]:
    key += 1
    
if key >= 1:
  print('No')
else:
  print('Yes')

### FIXED CODE ###

N = int(input())
S = input()
key = 0
 
if N%2 == 1:
  key += 1
else:
  for i in range(N//2):
    if S[i] != S[(N//2)+i]:
      key += 1
    
if key >= 1:
  print('No')
else:
  print('Yes')
n = map(int, input())
array = list(map(int, (input().split())))
map = {}
# make map to get table.
for i in range(n):
    map[array[i]] = i+1
# from 1 to n
list = []
for i in range(1, n+1):
    list.append(map[i])
print(list)

### FIXED CODE ###

n = int(input())
array = list(map(int, input().split()))
map = {}
for i in range(n):
    map[array[i]] = str(i+1)
list = []
for i in range(1, n+1):
    list.append(map[i])
print(" ".join(list))
n,k = map(int, input().split())
i=0
p = []
while i < n:
    p.append(int(input()))
    i += 1
#print(p)
#s=0
#l=0
#while l < k:
#    s += min(p)
#    p = p.remove(min(p))
#    l += 1
#print(s)　こっちはうまくいかない
p.sort()
s= sum(p[:k])
print(s)

### FIXED CODE ###

n,k = map(int, input().split())
p = list(map(int, input().split()))
p.sort()
#print(p)
s= sum(p[:k])
print(s)
X = int(input())
for t in range(1,X):
  total = t*(t+1)/2
  if total>=X:
    break
print(t)

### FIXED CODE ###

X = int(input())
t = 1
for t in range(1,X+1):
  total = t*(t+1)/2
  if total>=X:
    break
print(t)
import sys
K = int(input())
a, b = map(int, input().split())
for i in range(a, b+1):
  if i%K  0:
    print('Yes')
    sys.exit()
print('No')

### FIXED CODE ###

import sys
K = int(input())
a, b = map(int, input().split())
for i in range(a, b+1):
  if i%K == 0:
    print('OK')
    sys.exit()
print('NG')
a=int(input())
b=list(map(int,input().split()))
total=0
total2=0
i=1
while True:
    if b[i-1]>=b[i]:
        total+=1
    else:
        if total2<=total:
            total2=total
            total=0
    i+=1
    if i==a:
        break
print(max(total2))

### FIXED CODE ###

a=int(input())
b=list(map(int,input().split()))
total=0
total2=0
i=1
for i in range(a-1):
    if b[i+1]<=b[i]:
        total+=1
    else:
        if total2<=total:
            total2=total
        total=0
print(max(total2,total))
n,m=map(int,input().split())
dp=[-1]*(n+1)
E=[ [] for i in range(n+1) ]

for i in range(m):
  x,y=map(int,input().split())
  x-=1
  y-=1
  E[x].append(y)

def rec(v):
  if dp[v]!=-1:return dp[v]
  res=0
  for nv in E[v]:
    res=max(res,rec(nv)+1)
  dp[v]=res
  return res

res=0
for v in range(n):
  res=max(res,rec(v))
print(res)

### FIXED CODE ###

import sys
sys.setrecursionlimit(10**5)
#print(sys.getrecursionlimit())
n,m=map(int,input().split())
dp=[-1]*n
E=[ [] for i in range(n) ]

for i in range(m):
  x,y=map(int,input().split())
  x-=1
  y-=1
  E[x].append(y)

def rec(v):
  if dp[v]!=-1:return dp[v]
  res=0
  for nv in E[v]:
    res=max(res,rec(nv)+1)
  dp[v]=res
  return res

res=0
for v in range(n):
  res=max(res,rec(v))
print(res)
X = int(input())
if X => 30:
    print("YES")
else:
    print("No")

### FIXED CODE ###

X = int(input())
if X >= 30:
    print("Yes")
else:
    print("No")
n,q = map(int, input().split())
s = list(input())
lr_list = [list(map(int,input().split())) for _ in range(q)]
tmp_list = [0]*(n+1)

for i in range(n):
    if s[i]=='A' and s[i+1]=='C':
        tmp_list[i+1] = tmp_list[i]+1
    else:
        tmp_list[i+1] = tmp_list[i]
        
for l,r in lr_list:
    print(tmp_list[r-1]-tmp_list[l-1])

### FIXED CODE ###

n,q = map(int, input().split())
s = list(input())
lr_list = [list(map(int,input().split())) for _ in range(q)]
tmp_list = [0]*(n+1)

for i in range(1,n):
    if s[i-1]=='A' and s[i]=='C':
        tmp_list[i] = tmp_list[i-1]+1
    else:
        tmp_list[i] = tmp_list[i-1]

for l,r in lr_list:
    print(tmp_list[r-1]-tmp_list[l-1])
dq = deque()
num = int(sys.stdin.readline())
line = sys.stdin.readlines()

for i in range(num):

    order = line[i].split()

    if order[0] == 'insert':
        dq.appendleft(order[1])
    elif order[0] == 'deleteFirst':
        dq.popleft()
    elif order[0] == 'deleteLast':
        dq.pop()
    else:
        if order[1] in dq:
            dq.remove(order[1])

print(' '.join(dq))

### FIXED CODE ###

from collections import deque
import sys

dq = deque()
num = int(sys.stdin.readline())
line = sys.stdin.readlines()

for i in range(num):

    order = line[i].split()

    if order[0] == 'insert':
        dq.appendleft(order[1])
    elif order[0] == 'deleteFirst':
        dq.popleft()
    elif order[0] == 'deleteLast':
        dq.pop()
    else:
        if order[1] in dq:
            dq.remove(order[1])

print(' '.join(dq))
N = int(input())
A=[]
for i in range(N):
    A.append(int(input()))
c=0
while(True):
    b=0
    for i in A:
        if i%2==0:
            b=b+1
        if b==N:
            for j in range(N):
                A[j]=A[j]/2
            c=c+1
    if b!=N:
        break
print(c)

### FIXED CODE ###

N = int(input())
A = list(map(int, input().split()))
c=0
while True:
    for i in range(N):
        if A[i] % 2 !=0:
            print(c)
            exit()
        else:
            A[i] = A[i] / 2
    c=c+1
a=input()
b=a.split()
c=[int(i) for i in b]
t=c[0]+c[1]
h=c[0]-c[1]
k=c[0]*c[1]
ans=max([t,h,c])
print(ans)

### FIXED CODE ###

a=input()
b=a.split()
c=[int(i) for i in b]
t=c[0]+c[1]
h=c[0]-c[1]
k=c[0]*c[1]
ans=max([t,h,k])
print(ans)
n, m = map(int, input().split())

ans=set()
l, r = map(int, input().split())
for j in range(l,r+1):
    ans.add(j)

for i in range(m-1):
  l, r = map(int, input().split())
  temp=set()
  lm=min(list(ans))
  rm=min(list(ans))
  for j in range(min(l,lm), min(r,rm)+1):
    temp.add(j)
  ans=temp & ans

print(len(ans))

### FIXED CODE ###

n, m = map(int, input().split())

ans=set()
lm=0
rm=n
for i in range(m):
  l, r = map(int, input().split())
  lm=max(l, lm)
  rm=min(r, rm)
if rm - lm < 0:
  print(0)
else:
  print(rm - lm + 1)
w,h,x,y = map(int,input().split())

s = (w*h/2)

if (w/2 == x and h/2 != y)
or (w/2 != x and h/2 == y) \
or (w == x and 0 == y) \
or (0 == x and h == y) \
or (w == x and h == y) \
or (0 == x and 0 == y)):
  print(s,0)
else:
  print(s,1)



### FIXED CODE ###

w,h,x,y = map(int,input().split())

s = (w*h/2)

if (w/2 == x and h/2 == y):
  print(s,1)
else:
  print(s,0)
8 8
1 2
3 4
1 5
2 8
3 7
5 2
4 1
6 8

### FIXED CODE ###

N, M = map(int,input().split())
a = []
for i in range(M):
  K,S = map(int, input().split())
  a.append(K)
  a.append(S)
for i in range(N):
  print(a.count(i+1))
def check(cx, cy, H, x, y, h):
    if (h == 0) and (abs(cx-x)+abs(cy-y) > H):
        return True
    if H-h == abs(cx-x)+abs(cy-y):
        return True
    else:
        return False

def a():
    N = int(input())
    xs = []
    ys = []
    hs = []
    for _ in range(N):
        i = input().split(' ')
        xs.append(int(i[0]))
        ys.append(int(i[1]))
        hs.append(int(i[2]))
    
    for i, h in enumerate(hs):
        if h==0:
            continue
        else:
            init_x = xs[i]
            init_y = ys[i]
            init_h = h
            break
    for cx in range(101):
        for cy in range(101):
                H = abs(cx-init_x)+abs(cy-init_y)+init_h
            flag_stop = False
            for x, y, h in zip(xs, ys, hs):
                if not check(cx, cy, H, x, y, h):
                    flag_stop = True
                    break
            if flag_stop:
                continue
            else:
                print('{} {} {}'.format(cx, cy, H))
                return
a()



### FIXED CODE ###


def check(cx, cy, H, x, y, h):
    if (h == 0) and (abs(cx-x)+abs(cy-y) > H):
        return True
    if H-h == abs(cx-x)+abs(cy-y):
        return True
    else:
        return False

def a():
    N = int(input())
    xs = []
    ys = []
    hs = []
    for _ in range(N):
        i = input().split(' ')
        xs.append(int(i[0]))
        ys.append(int(i[1]))
        hs.append(int(i[2]))
    
    for i, h in enumerate(hs):
        if h==0:
            continue
        else:
            init_x = xs[i]
            init_y = ys[i]
            init_h = h
            break
    for cx in range(101):
        for cy in range(101):
            H = abs(cx-init_x)+abs(cy-init_y)+init_h
            flag_stop = False
            for x, y, h in zip(xs, ys, hs):
                if not check(cx, cy, H, x, y, h):
                    flag_stop = True
                    break
            if flag_stop:
                continue
            else:
                print('{} {} {}'.format(cx, cy, H))
                return
a()
S=input()
l=len(S)

C=[]
for i in range(l):
  for j in range(l+1):
    C.append(S[i:j])
C2=[x for x in C if x]
li=[]
s=0
for k in range(l):
  g=s+l-k
  li.append(C2[s:g])
  s=g
print(l)
    

### FIXED CODE ###

S = input()

if len(S) == 1:
    print(1)
    exit(0)

now = S[0]
k = 1
l = 2
ans = 1
while k < len(S) and l <= len(S):
    while S[k:l] == now:
        l += 1
        if l == len(S)+1:
            if now == S[k:l]:
                ans -= 1
            break
    now = S[k:l]
    k = l
    l = k+1
    ans += 1

print(ans)
N = int(raw_input())
A = map(int, raw_input().split())
 
count = [0]*(N+2)
for i in range(N):
    id = A[i]
    count[id] = count[id]+1
 
sumN = long(0)
for i in range(N+1):
    sumN = sumN + long(long(count[i]*(count[i]-1))/2)
 
for i in range(N):
    id = A[i]
    sumz = sumN - (count[id] - 1)
    print(sumz)

### FIXED CODE ###

N, M = map(int, raw_input().split())
res = 0
if N >= 2:
    res += N*(N-1)/2
if M >= 2:
    res += M*(M-1)/2

print(res)
N = input()


while len(N) > 1:
    M = sum(int(N[i]) for i in range(len(N)))
    N = str(M)

if M == 9 or M == 0:
    print('Yes')
else:
    print('No')

### FIXED CODE ###

N = input()

if int(N) % 9 == 0:
    print('Yes')
else:
    print('No')
A,B = [int(i) for i in input().split()]
if A <= 8:
    print('Yay!')
    if B <= 8:
        print('Yay!')
    elif:
        print(':(')
else:
    print(':(')

### FIXED CODE ###

A,B = [int(i) for i in input().split()]
if A > 8:
    print(':(')
elif B > 8:
    print(':(')
else:
    print('Yay!')
def koch(n, a, b):
  if n == 0:
    return
  s[0] = (2*a[0] + b[0])/3
  s[1] = (2*a[1] + b[1])/3
  t[0] = (a[0] + 2*b[0])/3
  t[1] = (a[1] + 2*b[1])/3
  u[0] = (t[0] - s[0])*cos(pi/3) - (t[1] - s[1])*sin(pi/3) + s[0]
  u[1] = (t[0] - s[0])*sin(pi/3) + (t[1] - s[1])*cos(pi/3) + s[1]

  koch(n-1, a, s)
  print  s[0], s[1]
  koch(n-1, s, u)
  print  u[0], u[1]
  koch(n-1, u, t)
  print  t[0], t[1]
  koch(n-1, t, b)

n = input()

p1[0] = 0.0
p1[1] = 0.0
p2[0] = 100.0
p2[1] = 0.0

print p1[0], p1[1]
koch(n, p1, p2)
print p2[0], p2[1]

### FIXED CODE ###

import math

rad = math.radians(60)

class coordinates:
  def __init__(self, x, y):
    self.x = x
    self.y = y
 
def koch(n, a, b):
  if n == 0:
    return
  s = coordinates((2.0*a.x + b.x)/3.0, (2.0*a.y + b.y)/3.0)
  t = coordinates((a.x + 2.0*b.x)/3.0, (a.y + 2.0*b.y)/3.0)
  ux = (t.x - s.x)*math.cos(rad) - (t.y - s.y)*math.sin(rad) + s.x
  uy = (t.x - s.x)*math.sin(rad) + (t.y - s.y)*math.cos(rad) + s.y
  u = coordinates(ux, uy)
  
  koch(n-1, a, s)
  print  s.x, s.y
  koch(n-1, s, u)
  print  u.x, u.y
  koch(n-1, u, t)
  print  t.x, t.y
  koch(n-1, t, b)
  
n = input()
  
p1 = coordinates(0.0, 0.0)
p2 = coordinates(100.0, 0.0)
  
print p1.x, p1.y
koch(n, p1, p2)
print p2.x, p2.y
l = input().split()
N = int(l[0])
K = int(l[1])

l = input().split()
s = 0
A = []
for i in range(N):
    a = int(l[i])
    s += a
    A.append(a)

B = []
s1 = 0
for i in range(N):
    B.append(s - s1)
    s1 += A[i]
B.append(0)

# print(N, K, A, B)

ans = 0
for i in range(N):
    b = B[i]
    if b < K:
        break
    small = 0
    large = N
    j = (small + large)//2
    while True:
        index = N - 1 - j
        # print(i, j, b, index, B[index], B[index + 1], small, large)
        if b - B[index] < K and b - B[index + 1] >= K:
            # print(ans, i, j)
            ans += j + 1
            break
        if b - B[index] < K:
            large = j
            j = (small + large)//2
        else:
            small = j
            j = (small + large)//2

print(ans)


### FIXED CODE ###

l = input().split()
X = int(l[0])
A = int(l[1])

if X < A:
    print(0)
else:
    print(10)
n, y = map(int,input().split())
s = []
for i in range(n):
    for j in range(n-i):
        if i * 10000 + j * 5000 + (n-i-j) * 1000 == y:
            s.append(i)
            s.append(j)
            s.append(k)
            break
            
if s ==[]:
    print('-1 -1 -1')
else:
    print(str(s[0]) + ' ' + str(s[1]) + ' ' + str(s[2]))
            


### FIXED CODE ###

n, y = map(int,input().split())
s = []
for i in range(n+1):
    for j in range(n+1):
        if i * 10000 + j * 5000 + (n-i-j) * 1000 == y and n-i-j > -1:
            s.append(i)
            s.append(j)
            s.append(n-i-j)
            break
            
if s ==[]:
    print('-1 -1 -1')
else:
    print(str(s[0]) + ' ' + str(s[1]) + ' ' + str(s[2]))
def gcd(a,b):
    if a<b:
        d=a;
        a=b;
        b=d;
    c=a%b

    if c==0:
        return b
    else:
        return gcd(b,c)

def lcm(a,b):
    c=gcd(a,b);
    return a/c*b

n=int(input())
t=[0]*n

for lop2 in range(n):
    t[lop2]=int(input())

ans=t[0]

for lop in range(1,n):
    ans=lcm(ans,t[lop])
print(int(ans))

### FIXED CODE ###

N = input()
n=int(N)
n2=(n%10)*100
n2+=(n%100)-n%10
n2+=(n-n%100)/100
if n==n2 :
	print('Yes\n')
else:
	print('No\n')
quit()
din=input()
if din[1] != '0':
	print(100)
else:
	print(0)


 





### FIXED CODE ###

from collections import deque
import math
import os
import random
import re
import sys
#n=list(map(int, input().split()))
#n=map(int, input().split())

def main():
	n=int(input())
	change = n%1000
	if change:
		print(1000-change)
	else:
		print(0)
		
	
main()

'''
if __name__ == '__main__':
    main()
'''
max = 0
i = 0
j = 0
k = 0
n_max = 0

n_max = int(raw_input())
price = [1,2,3,4,5]

for i in range(5):
  if max <= price[5] - price[i]:
    print max

### FIXED CODE ###

import sys

n = int(raw_input())

min_R = int(raw_input())
nums = map(int, sys.stdin.readlines())

ans = -10**9

for num in nums:
    if num - min_R > ans:
        ans = num - min_R
    if num < min_R:
        min_R = num
        
print ans
n = int(input())
a = list(map(int, input().split()))

rates = [0]*9
for i in range(n):
  rates[a[i]//400] += 1

n_min, n_max = 0, 0
if max(rates[:-1]) > 0:
  for i in range(8):
    n_min += 1 if rates[i] > 0 else 0
  n_max = n_min+rates[-1]
else:
  n_min = 1
  n_max = rates[-1]

print(n_min, n_max)

### FIXED CODE ###

import copy
n = int(input())
a = list(map(int, input().split()))

color = [0]*9
for i in range(n):
    rate = min(a[i]//400, 8)
    color[rate] += 1

ans_min = 0
color_min = copy.deepcopy(color)
for c in color_min[:-1]:
    if c > 0:
        ans_min += 1
ans_min = max(1, ans_min)

ans_max = 0
color_max = copy.deepcopy(color)
for c in color_max[:-1]:
    if c > 0:
        ans_max += 1
ans_max += color_max[-1]

print(ans_min, ans_max)
a = [int(i) for i in input().split()]
a.sort()
if a[0] == 5 and a[1] == 5 and a[2] == 7 :
    print('YES')
else
    print('NO')

### FIXED CODE ###

a = [int(i) for i in input().split()]
a.sort()
if a[0] == 5 and a[1] == 5 and a[2] == 7 :
    print('YES')
else :
    print('NO')
#!/usr/bin/env python3
import sys, itertools
from math import gcd
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8')
sys.setrecursionlimit(10**8)
inf = float('inf')
ans = count = 0



a, b, c = map(int, input().split())
for i in itertools.permutations([a, b, c], 3):
    if i[0] == sum(i[1:]) or sum(i[:2]) == i[2]:
        print("Yes")
        exit()

print("No")


### FIXED CODE ###

#!/usr/bin/env python3
import sys, math, itertools, heapq, collections, bisect, fractions
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8')
sys.setrecursionlimit(10**8)
inf = float('inf')
ans = count = 0

a,b,c=map(int,input().split())
for i in itertools.permutations([a,b,c],3):
    if i[0]==sum(i[1:]) or sum(i[:2])==i[2]:
        print("Yes")
        exit()

print("No")
def cross_gugge(A):
  if A[0][0] == 1 and A[1][1] == 1 and A[2][2] == 1:
    ans += 1
  elif A[0][2] == 1 and A[1][1] == 1 and A[2][0] == 1:
    ans += 1
    
A = [list(map(int,input().split())) for i in range(3)]
N = int(input())
B = [int(input()) for i in range(N)]
ans = 0
for i in range(3):
  for j in range(3):
    for k in B:
      if A[i][j] == k:
        A[i][j] = 1
for i in range(3):
  if A[i].count(1) == 3:
    ans += 1
  elif A[0][i] == 1 and A[1][i] == 1 and A[2][i] == 1:
    ans += 1
cross_gugge(A)
if ans > 0:
  print("Yes")
else:
  print("No")



### FIXED CODE ###

N = int(input())
if N % 2 == 0:
  print( N // 2)
else:
  print( N // 2 + 1)
N=int(input())
A=int(input()).split()
c=0
for i in N:
  c+=A[i]**-1
print(c**-1)

### FIXED CODE ###

N=int(input())
A=list(map(int,input().split()))
c=[1/i for i in A]
print(1/sum(c))
with open('random_pm00.txt') as f:
    n, k = map(int, f.readline().split())
    a = list(map(int, f.readline().split()))
#n, k = map(int, input().split())
#a = list(map(int, input().split()))
mod = 10 ** 9 + 7

mia = sorted([i for i in a if i < 0], reverse=True)
pla = sorted([i for i in a if i >= 0])
ans, num = 1, []

if len(pla) == 0 and k % 2 == 1:
    for i in mia[:k]:
        ans = ans * i % mod
    print(ans)
    exit()

for _ in range(k):
    if len(mia) > 0 and len(pla) > 0:
        if abs(mia[-1]) <= pla[-1]:
            tmp = pla.pop()
        elif abs(mia[-1]) > pla[-1]:
            tmp = mia.pop()
    elif len(mia) == 0:
        tmp = pla.pop()
    elif len(pla) == 0:
        tmp = mia.pop()
    num.append(tmp)

cnt = sum(i < 0 for i in num)
for i in num:
    ans = ans * i % mod

print(cnt)
if cnt % 2 == 1:
    if len(mia) > 0:
        for i in num[::-1]:
            if i >= 0:
                p, q = i, mia.pop()
                break
        if len(pla) == 0:
            ans *= q * pow(p, mod - 2, mod)
    if len(pla) > 0:
        for i in num[::-1]:
            if i < 0:
                r, s = i, pla.pop()
                break
        if len(mia) == 0:
            ans *= s * pow(r, mod - 2, mod)
    if len(mia) > 0 and len(pla) > 0:
        if p * r >= q * s:
            ans *= s * pow(r, mod - 2, mod)
        if p * r < q * s:
            ans *= q * pow(p, mod - 2, mod)
    ans %= mod
print(ans)


### FIXED CODE ###

#with open('random_pm00.txt') as f:
    #n, k = map(int, f.readline().split())
    #a = list(map(int, f.readline().split()))
n, k = map(int, input().split())
a = list(map(int, input().split()))
mod = 10 ** 9 + 7

mia, pla = [], []
for ai in a:
    if ai < 0:
        mia.append(ai)
    elif ai >= 0:
        pla.append(ai)
mia.sort(reverse=True)
pla.sort()

cnt = 1
if len(pla) == 0 and k % 2 == 1:
    for i in mia[:k]:
        cnt = cnt * i % mod
else:
    while k > 0:
        if k == 1 or len(mia) <= 1:
            if len(pla) == 0:
                cnt = cnt * mia.pop() % mod
            elif len(pla) > 0:
                cnt = cnt * pla.pop() % mod
            k -= 1
        elif len(pla) <= 1:
            if k == 1:
                cnt = cnt * pla.pop() % mod
                k -= 1
            elif k > 1:
                cnt = cnt * mia.pop() * mia.pop() % mod
                k -= 2
        elif len(pla) >= 2 and len(mia) >= 2:
            if pla[-1] * pla[-2] > mia[-1] * mia[-2]:
                cnt = cnt * pla.pop() % mod
                k -= 1
            elif pla[-1] * pla[-2] <= mia[-1] * mia[-2]:
                cnt = cnt * mia.pop() * mia.pop() % mod
                k -= 2
print(cnt)
N = int(input())
life_list = list(map(int, input().split()))
life_list.sort()
while life_list[1] - life_list[0] > 0:
    if life_list[1] == life_list[0]:
        break
	life_list[1] = life_list[1] - life_list[0]
    life_list.sort()
        
print(life_list[0])



### FIXED CODE ###

A, B = map(int, input().split())

if B % A == 0:
    print(A+B)
else:
    print(B-A)
import math

A,B,C,D = map(int,input().split())

gcd = math.gcd(C,D)
lcm = int(C*D/gcd)

comp = int(((lcm//C) + (lcm//D) - 1) * ((B-A+1)//lcm))

for i in range((B-A+1)%lcm):
    if (A+i)%C == 0 or (A+i)%D == 0:
        comp += 1

print(B-A+1-comp)


### FIXED CODE ###

import fractions

A,B,C,D = map(int,input().split())

gcd = fractions.gcd(C,D)
lcm = int(C*D/gcd)

ans_A = int((A-1) - (A-1)//C - (A-1)//D + (A-1)//lcm)
ans_B = int(B - B//C - B//D + B//lcm)
print(ans_B - ans_A)
n, r = map(int, (input().split()))
print(100 * max(0, (10 - n) + r)


### FIXED CODE ###

n, r = map(int, (input().split()))
print(r + (100 * max(0, (10 - n))))
import numpy as np

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

a = np.array(A)
l = int(((N**2)+1)/2)
b = np.tile((1,-1),(1,l))
c = (np.delete(b, 2*l-1, axis=None)).reshape(N,N)
# print(c)
# d = c.reshape(N,N)
inv = 0.5*( np.triu(c) - ( np.tril(c) - np.eye(N) ) )
# g = np.eye(N)
# print(inv)
x = 2*(np.dot(inv,a))
# print(x)
ans = list(map(str, list(map(int, list(x)))))
print(" ".join(ans))

### FIXED CODE ###

import numpy as np
N = int(input())
A = list(map(int, input().split()))
a = np.array(A)
# l = int(((N*N)+1)/2)
b = []
for i in range(N):
    if i%2==0:
        b.append(1)
    else:
        b.append(-1)
c = np.dot(np.array(b),a)
x = [c]
for j in range(1,N):
    x_j = 2*a[j-1] - x[j-1]
    x.append(x_j)
ans = list(map(str, list(map(int, list(x)))))
print(" ".join(ans))
N, A, B = map(int, input().split())

q = int(N / (A+B))
r = N%(A+B)
#print((q+1)*A if r>A else q*A+r)
print(q*A + min(A, r))

### FIXED CODE ###

S = list(input())
if S[0]==S[1] and S[0]==S[2]:
    print('No')
else:
    print('Yes')