peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Wrong Answer
k = int(input())
s = input()

if len(s) < k:
    print(s)
else:
    print(s[:k] + "...")
# Judge status: Accepted
n=int(input())
s=input().rstrip()
r=s.count("R")
g=s.count("G")
b=s.count("B")
count=0
for i in range(n-2):
    for j in range(i+1,n-1):
        if j+j-i<n:
            if s[i]!=s[j] and s[i]!=s[j+j-i] and s[j]!=s[j+j-i]:
                count+=1
print(r*g*b-count)
# Judge status: Accepted
x, y, z = 0, 0, 0
n = int(input())
for _ in range(n):
    a, b, c = map(int, input().split())
    x, y, z = a + max(y, z), b + max(x, z), c + max(x, y)
print(max(x, y, z))
# Judge status: Accepted
import sys
D = int(input())
D -= 25
sys.stdout.write('Christmas')
while D<0:
    sys.stdout.write(' Eve')
    D += 1
# Judge status: Accepted
n,a,b=map(int,input().split())
mod=10**9+7
ans=pow(2,n,mod)-1
def comb(n,m):
    mod=10**9+7
    import functools
    import operator
    x,y=1,1
    for i in range(n-m+1,n+1):
        x*=i
        x%=mod
    for i in range(1,m+1):
        y*=i
        y%=mod
    if n-m<0:
        return 0
    return((x*pow(y,mod-2,mod))%mod)

ans=(ans-comb(n,a)-comb(n,b))%mod
print(ans)
# Judge status: Accepted
s = input()
t = input()
count = 0
for i in range(len(s)):
    if s[i] != t[i]:
        count += 1
print(count)
# Judge status: Accepted
import collections
n = int(input())
a = sorted(list(map(int, input().split())))

cnt = collections.Counter(a)
l1 = 0
l2 = 0

for i in cnt.keys():
    if cnt[i] >= 4:
        l1 = i
        l2 = i
    elif cnt[i] >= 2:
        l1, l2 = i, l1
print(l1 * l2)
# Judge status: Accepted
N = int(input())

if N < 1000:
    print("ABC")
else:
    print("ABD")
# Judge status: Accepted
inpl = lambda: list(map(int,input().split()))
X, Y, Z = inpl()
print(Z, X, Y)
# Judge status: Accepted
length = int(input())
ans = length**3 / 27
print(ans)
# Judge status: Accepted
print('YNeos'[not ('7'in input())::2])
# Judge status: Accepted
n=int(input())

def pro(n):
    if n%2==0:
        return 1/2
    else:
        return ((n+1)/2)/n
print(pro(n))
# Judge status: Wrong Answer
K = int(input())
A, B = map(int, input().split())

p = A % K
q = B % K

if A==B:
	if p==0:
		print("OK")
	else:
		print("NG")
  
else:
	if p+q >K:
		print("OK")
	else:
		print("NG")
# Judge status: Accepted
a,b = map(int,input().split())
ans = 0
for i in range(a,b+1):
  s = str(i)
  if s[0] == s[4] and s[1] == s[3]:
    ans += 1
print(ans)
# Judge status: Accepted
n,m = map(int,input().split())
A =[int(input()) for _ in range(m)]
dict = {i:False for i in range(n)}
for a in A:
    dict[a]=True
dp = [0 for _ in range(n+2)]
dp[0] = 1
MOD = 1000000007
for i in range(n):
    if not dict[i]:
        dp[i+1] = (dp[i]+dp[i+1])%MOD
        dp[i+2] = (dp[i]+dp[i+2])%MOD
print(dp[n])
# Judge status: Wrong Answer
N = int(input())
P = list(map(int, input().split()))
cnt = 0
for n in range(N-1):
    if P[n] >= P[n+1]:
        cnt += 1
cnt += 1
print(cnt)
# Judge status: Wrong Answer
a=input()
#str = list(a)
print(a[:2])
# Judge status: Accepted
lis=list(input())
lislen=len(lis)
ma=0
for a in range(1,(len(lis)-1)//2+1):
    if lis[0:a]==lis[a:a+a]:
        ma=a*2
print(ma)
# Judge status: Wrong Answer
n=str(input())
print(n[0])
if n[0]=="7":
  print("Yes")
elif n[1]=="7":
  print("Yes")
elif n[2]=="7":
  print("Yes")
else:
  print("No")
# Judge status: Accepted
N = int(input())
S = [input() for i in range(N)]
s = set()
p = None
for w in S:
    if w in s:
        print('No')
        exit()
    s.add(w)
    if p and p != w[0]:
        print('No')
        exit()
    p = w[-1]
print('Yes')
# Judge status: Accepted
a, s, c = map(str, input().split())
ans = str(a[0]+s[0]+c[0])
print(ans)
# Judge status: Wrong Answer
n,a,b = map(int,input().split())
if a > b:
    print(0)
elif n < (b-a+1):
    print(0)
else:
    diff = b-a+1
    ans = (diff**(n-2))//2+1
    print(int(ans))
# Judge status: Accepted
n = int(input())
a_list = [int(x) for x in input().split()]

a_sum = sum(a_list)
f = a_sum // n
c = (a_sum + n - 1) // n
b = f if abs(a_sum - f * n) < abs(a_sum - c * n) else c

ans = 0
for a in a_list:
    ans += (a - b) ** 2
print(ans)
# Judge status: Wrong Answer
# -*- coding: utf-8 -*-
S = input()
ans = 0
for i in range(len(S)):
  if i > 0:
    if S[i-1] == S[i] == "R":
      ans += 1
    
  elif S[i] == "R":
    ans += 1
print(ans)
# Judge status: Wrong Answer
n=int(input())
k=[]
i=1
cnt=1
for i in range(n):
    l=int(input())
    k.append(l)
cnt += 1
i = k[0]
if '2' not in k:
    print(-1)
else:
    while i != 2:     
        if i==k[i-1]:
            cnt += 1
            i=k[i-1]
    if cnt>n:
        print(-1)
    else:
        print(cnt)
# Judge status: Wrong Answer
a, b = input().split()
ab = int(a + b)

for i in range(1, 101):
    if i**2 == ab:
        print("Yes")
        break
else:
    print("No")
# Judge status: Accepted
import math
n = int(input())
a = list(map(int,input().split()))

b = [0]*n 
s = [0]*(n+1)

for i in reversed(range(1,n+1)):
	for k in range(1,math.floor(n/i)+1):
		j = int(k*i)
		s[i] += b[j-1]
	if s[i]%2 != a[i-1]:
		b[i-1] += 1

L = [i+1 for i in range(n) if b[i] == 1]
print(len(L))
print(*L)
# Judge status: Accepted
from collections import Counter
n = int(input())
a = list(map(int, input().split()))

ans = Counter() 
for i in range(n):
    ans[a[i]-1]+=1
    ans[a[i]]+=1
    ans[a[i]+1]+=1
print(ans.most_common(1)[0][1])
# Judge status: Wrong Answer
import sys
sys.setrecursionlimit(10 ** 7)

S, T = list(map(int,(input().split())))
p = list(map(int,(input().split())))
ans = 0
anss = []
temp_sum= 0
sum_max = []
for i in range(T):
  ans = 0
  samp = p[i:T+i]
  if temp_sum < sum(samp):
    temp_sum = sum(samp)
    sum_max = samp
    
#print(sum_max)
for i in sum_max:
  x =(list(range(1,i+1)))
  ans += sum(x)/len(x)
  
print(ans)
# Judge status: Accepted
k, n = list(map(int, input().split()))
x = list(map(int, input().split()))
x.sort()
df = [0] * (n - 1)
for i in range(n - 1):
    df[i] = abs(x[i + 1] - x[i])

df = sorted(df, reverse=True)
print(sum(df[k - 1 :]))
# Judge status: Accepted
n = int(input())
dp = [float("Inf")]*(n+1)
for i in range(min(6, n+1)):
    dp[i] = i
for i in range(n):
    for j in range(1,n//6+1):
        if i + 6**j > n:
            break
        dp[i+6**j] = min(dp[i+6**j], dp[i] + 1)
    for j in range(1,n//9+1):
        if i + 9**j > n:
            break
        dp[i+9**j] = min(dp[i+9**j], dp[i] + 1)
print(dp[-1])
# Judge status: Accepted
import sys
input = sys.stdin.readline


def main():
    AB = []
    n = int(input())
    for i in range(n):
        a, b = map(int, input().split())
        AB.append([a, b])
    AB = sorted(AB, key=lambda x: (x[1], -x[0]))
    time = 0
    for span, dead in AB:
        time += span
        if time > dead:
            print('No')
            return
    print('Yes')
    return


if __name__ == "__main__":
    main()
# Judge status: Accepted
n, m = map(int, input().split())
ab = [list(map(int, input().split())) for i in range(n)]
cd = [list(map(int, input().split())) for i in range(m)]
ans = [[] for i in range(n)]
for i in range(n):
    for j in range(m):
        ans[i].append(abs(ab[i][0]-cd[j][0])+abs(ab[i][1]-cd[j][1]))
for i in range(n):
    print(ans[i].index(min(ans[i]))+1)
# Judge status: Accepted
k , a, b = map(int, input().split())

ans = 0

if b-a <= 2:
    ans = k+1
else:
    ans  = a
    k -= a - 1
    ans += (b-a) * (k//2) + k % 2

print(ans)
# Judge status: Accepted
n = int(input())
t = 0
x = 0
y = 0
for i in range(n):
    t_in,x_in,y_in = map(int,input().split())
    diff_t = t_in - t
    diff_x = abs(x_in-x)
    diff_y = abs(y_in-y)
    sum_xy = diff_x + diff_y
    if diff_t < sum_xy:
        print('No')
        exit()
    else:
        if diff_t%2 != sum_xy%2:
            print('No')
            exit()
print('Yes')
# Judge status: Accepted
import fractions

A, B, C, D = [int(i) for i in input().split()]
A = A - 1
l = (C * D) // fractions.gcd(C,D)

b_sum = B -(B//C) - (B//D) + (B//l)
a_sum = A - (A//C) - (A//D) + (A//l)

print(b_sum - a_sum)
# Judge status: Accepted
n,d = list(map(int, input().split()))
x = d*2 + 1
ans = (-n//x)*-1
print(ans)
# Judge status: Wrong Answer
num = int(input())
l_a = input().split()
s_a = set(l_a)

dc = {}

l_s = []
for i in s_a:
  dc[i] = l_a.count(i)
  
index = 1
k = 0
l_key = sorted(dc.keys())

for i in l_key:
  while int(i) + k < index:
    print(0)
    k += 1
  print(dc[i])
  index += 1
  
while index <= num:
  print(0)
  index += 1
# Judge status: Wrong Answer
S = input()
print(S+'es' if S.endswith('s') else print(S+'s'))
# Judge status: Wrong Answer
N,M = map(int,input().split())
H= list(map(int,input().split()))

X = [1]*N
for i in range(M):
    a,b = map(int,input().split())
    x1 = H[a-1]
    x2 = H[b-1]
    if x1 < x2:
        X[a-1] = False
        if X[b-1] != False:
            X[b-1] = True

    else:
        X[b-1] = False
        if X[a-1] != False:
            X[a-1] = True
print(X.count(True))
# Judge status: Accepted
[h1,m1,h2,m2,k] = [int(i) for i in input().split()]

print((h2 - h1) * 60 + (m2 - m1) - k)
# Judge status: Accepted
import statistics
n = int(input())
a = list(map(int, input().split()))
median_low = statistics.median_low(a)
median_high = statistics.median_high(a)
for i in range(n):
    if median_high > a[i]:
        print(median_high)
    elif median_low < a[i]:
        print(median_low)
    elif median_high == a[i]:
        print(a[i])
    else:
        print(a[i-1])
# Judge status: Accepted
import sys
sys.setrecursionlimit(10 ** 5 + 10)
def input(): return sys.stdin.readline().strip()

def resolve():
    
    a,b,c,d=map(int,input().split())
    print('Yes' if abs(a-c)<=d or (abs(a-b)<=d and abs(b-c)<=d) else 'No')
    
resolve()
# Judge status: Wrong Answer
X,N = map(int,input().split())
p = list(map(int,input().split()))
min1=[]
x_min = 100
num_list = list(range(101))
for i in range(N):
    num_list.remove(p[i])

for j in reversed(num_list):
    x = abs(j-X)
    if x_min >= x:
        x_min =  x
        close=j
print(close)
# Judge status: Accepted
N = int(input())
A = list(map(int, input().split()))

if N == 0:
    if A[0] == 1:
        print(1)
    else:
        print(-1)
    exit()

if A[0] != 0:
    print(-1)
    exit()

ans = 1
prev = 1
P = []
for a in A[1:]:
    P.append(prev)
    mx = prev * 2

    if mx < a:
        print(-1)
        exit()

    ans += mx
    prev = mx - a

while prev and P:
    ans -= prev
    pr = P.pop()
    prev = max(0, prev - pr)

print(ans)
# Judge status: Wrong Answer
h, a = map(int, input().split())

n = h/a

if n != 0:
  print(n+1)
else :
  print(n)
# Judge status: Accepted
N = int(input())
S = input()
num = S[1:].count("E")
ans = num
for i in range(1, N):
    if S[i - 1] == "W":
        num += 1
    if S[i] == "E":
        num -= 1
    ans = min(num, ans)
print(ans)
# Judge status: Accepted
import math

def makelist(n, m):
    return [[0 for _ in range(m)] for _ in range(n)]

# n = int(input())
# a, b
# s = input()

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

ac = 0
wa = 0
memo = [0]*(N+1)

for _ in range(M):
    p, S = input().split()
    p = int(p)

    if S == "AC":
        if memo[p] != -1:
            ac += 1
            wa += memo[p]
            memo[p] = -1
    else:
        if memo[p] != -1:
            memo[p] += 1

print(ac, wa)
# Judge status: Accepted
#B
n = int(input())
robot = []
for i in range(n):
    x,l = map(int, input().split())
    ri = x - l
    le = x + l
    robot.append([ri, le])
robot.sort(key=lambda x: x[1])
# print(robot)
a = robot[0][1]
count=1
for i in range(1, n):
    if a > robot[i][0]:
        pass
    else:
        # print(robot[i])
        #残せる
        a = robot[i][1]
        count += 1
print(count)
# Judge status: Wrong Answer
n,a,b = map(int, input().split())
cnt = 0

def digidsum(x):
  s = str(n)
  array_list = list(map(int,s))
  return sum(array_list)



for i in range(n):
  if digidsum(i+1) >= a and digidsum(i+1) <= b:
    cnt += i+1
print(cnt)
# Judge status: Accepted
import sys

input = sys.stdin.readline


def main():
    D, N = map(int, input().split())

    if N == 100:
        ans = 100 ** D * (N + 1)
    else:
        ans = 100 ** D * N

    print(ans)


if __name__ == "__main__":
    main()
# Judge status: Accepted
n, m = [int(i) for i in input().split()]
a = [int(i) for i in input().split()]
a.sort()
bc = [[int(i) for i in input().split()] for _ in range(m)]
bc.sort(key=lambda x: -x[1])

i = 0
for b, c in bc:
    for _ in range(b):
        a[i] = max(a[i], c)
        i += 1
        if i == n:
            break
    if i == n:
        break
print(sum(a))
# Judge status: Wrong Answer
n=int(input())
r=0
i=1
while 2*5**i<=n:
	r+=n//(2*5**i)
	i+=1
print(r)
# Judge status: Accepted
a, b, c = map(int, input().split())

if (a == b and b != c) or (b == c and c != a) or (c == a and a != b):
    print("Yes")
else:
    print("No")
# Judge status: Accepted
s=input()
ans=0
c=0
for i in range(len(s)):
    if s[i] in ["A","C","G","T"]:
        c+=1
    else:
        c=0
    ans=max(ans,c)
print(ans)
# Judge status: Accepted
import sys
input = sys.stdin.readline

def main():
    N, Y = map(int, input().split())
    ans = "-1 -1 -1"
    for i in range(N+1):
        for j in range(N+1-i):
            if 10000 * i + 5000 * j + 1000 * (N - i - j) == Y:
                ans = "{} {} {}".format(i, j, N-i-j)
                break
        if ans != "-1 -1 -1":
            break
    print(ans)

if __name__ == '__main__':
    main()
# Judge status: Accepted
N = int(input())

for x in range(N+10):
    if (x*(x+1))//2 >= N:
        break

ans = list(range(1, x+1))
rem = (x*(x+1))//2 - N
for a in ans:
    if a != rem:
        print(a)
# Judge status: Wrong Answer

N = int(input())
T = []
for i in range(N):
    T.append(int(input()))
print('T:',T)

if N==1:
    f2 = T[0]

elif N==2:
    import math
    a,b = T[0], T[1]
    f=math.gcd(a,b)
    f2=a*b//f

else:
    import math
    a,b = T[0], T[1]
    f=math.gcd(a,b)
    f2=a*b//f
    for i in range(2,N):
        a,b=f2, T[i]
        f=math.gcd(a,b)
        f2=a*b//f

print(f2)
# Judge status: Wrong Answer
a, b = map(int,input().split())
print(a) if a < b else print(a-1)
# Judge status: Accepted
def myAnswer(S:str)-> str:
   N = len(S)
   if(N == 1): return "YES"
   dic = {"a":0,"b":0,"c":0}
   for s in S:
      dic[s] += 1
   # print(dic)
   dic = list(dic.values())
   dic.sort(reverse = True)
   first = dic.pop(0)
   seccond = dic.pop(0)
   third = dic.pop(0)
   if(first - third <= 1):
      return "YES"
   else:
      return "NO"




def modelAnswer():
   return
def main():
   S = (input())
   print(myAnswer(S))
if __name__ == '__main__':
   main()
# Judge status: Accepted
n, k = map(int, input().split())
a = list(map(int, input().split()))

top = max(a)
bottom = 0

while (top - bottom) > 1:
    mid = (top + bottom) // 2
    div_n = lambda a: (a + mid - 1) // mid - 1
    cnt = sum(map(div_n, a))
    if cnt <= k:
        top = mid
    else:
        bottom = mid

print(top)
# Judge status: Accepted
n,k=map(int,input().split())
h=list(map(int,input().split()))
dp=[float('inf')]*n
dp[0]=0

for i in range(n):
    for j in range(1,k+1):
        if 0<=i-j<n:
            dp[i]=min(dp[i],dp[i-j]+abs(h[i]-h[i-j]))
print(dp[-1])
# Judge status: Accepted
a,b,c=map(int,input().split())
if (a%2 == 0) or (b%2 == 0) or (c%2 == 0):
    print(0)
else:
    print(min(a*b,b*c,a*c))
# Judge status: Accepted
a,b,k = map(int,input().split())
l = []
for i in range(1,101):
  if a%i == 0 and b%i == 0: l.append(i)
print(l[-k])
# Judge status: Accepted
n,m=map(int,input().split())
if abs(n-m)>1:
  print(0)
  exit()
import math
#print(math.factorial(4))
if abs(n-m)==1:
  n_=math.factorial(n)%(10**9+7)
  m_=math.factorial(m)%(10**9+7)
  print((n_*m_)%(10**9+7))
if abs(n-m)==0:
  n_=math.factorial(n)%(10**9+7)
  m_=math.factorial(m)%(10**9+7)
  print((2*n_*m_)%(10**9+7))
# Judge status: Accepted
S = input()
MIN = 1000
for T in range(0,len(S)-2):
    X = int(S[T:T+3])
    Num = abs(X-753)
    if Num<MIN:
        MIN = Num
print(MIN)
# Judge status: Accepted
xs = input().split()
 
print("A"+xs[1][0]+"C")
# Judge status: Accepted
from math import sqrt

N = int(input())
xy = [list(map(int, input().split())) for _ in range(N)]

result = 0
for i in range(N):
    for j in range(N):
        if i != j:
            result += sqrt((xy[i][0] - xy[j][0]) * (xy[i][0] - xy[j]
                                                    [0]) + (xy[i][1] - xy[j][1]) * (xy[i][1] - xy[j][1]))
print(result / N)
# Judge status: Accepted
a=input()
b=[str(c) for c in a]
b.sort()
c=len(b)
d=0
for i in range(c-1):
	if b[i]==b[i+1]:
		d=d+1
if d>0:
	print('no')
else:
	print('yes')
# Judge status: Wrong Answer
N = int(input())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
C = list(map(int,input().split()))

count = 0
for i in range(N):
	count += B[A[i]-1]
	# 最後は追加の満足度はないから省く
	if i != N-1:
		try:
			# 追加の満足度
			count += C[A[i]-1]
		except IndexError as e:
			pass

print(count)
# Judge status: Wrong Answer
n=int(input())
a=list(map(int,input().split()))
a=sorted(a)

print(sum(a[n:2*n]))
# Judge status: Accepted
import math
n, q = map(int, input().split())

s = input()

t = [0]

tmp = 0
for i in range(len(s)-1):
    if s[i] == "A" and s[i+1] == "C":
        tmp += 1

    t.append(tmp)

for _ in range(q):
    l,r = map(int, input().split())
    print(t[r-1]-t[l-1])
# Judge status: Wrong Answer
X = list(map(int,input().split()))[0]
yen = 100

for i in range(1,10**18):
  yen = int(yen*1.01)
  if yen > X:
    break

print(i)
# Judge status: Accepted
def a():
    X = int(input())
    print(10 - X//200)


##########
if __name__ == "__main__":
    a()
# Judge status: Wrong Answer
def resolve():
    N = int(input())
    A = list(map(int, input().split()))
    for i in range(N-1):
        print(A.count(i+1))
resolve()
# Judge status: Accepted
import fractions

a, b, c, d = map(int, input().split())
lcm_cd = (c * d) // fractions.gcd(c, d)
total = b - a + 1
d_c = b // c - (a - 1) // c
d_d = b // d - (a - 1) // d
d_cd = b // lcm_cd - (a - 1) // lcm_cd
print(int(total - (d_c + d_d - d_cd)))
# Judge status: Accepted
import sys
read = lambda: sys.stdin.readline().rstrip()

def counting_tree(N, D):
    tot = 1
    
    # cnt = collections.Counter(D)
    cnt = [0]*N
    for i in D:
        cnt[i]+=1

    for i in D[1:]:
        tot = tot * cnt[i-1]%998244353

    return tot if D[0]==0 else 0

def main():
    
    N0 = int(read())
    D0 = tuple(map(int, read().split()))

    res = counting_tree(N0, D0)

    print(res)

if __name__ == "__main__":
    main()
# Judge status: Accepted
n = int(input())
A = [int(input()) for _ in range(n)]
ma_1 = max(A)
ma_2 = sorted(A)[-2]
for a in A:
    if a == ma_1:
        print(ma_2)
    else:
        print(ma_1)
# Judge status: Accepted
a, b, c = list(input().split())
print("bust" if int(a)+int(b)+int(c) > 21 else "win")
# Judge status: Accepted
N = int(input())
H = list(map(int,input().split()))

maxH = 0
for i in range(N-1):
  if H[i+1] >= maxH-1:
    maxH = max(maxH,H[i+1])
  else:
    print("No")
    exit()
    
print("Yes")
# Judge status: Accepted
n,w = map(int,input().split())
v = [0]*(n+1)
for i in range(1,n+1):
    v[i] = list(map(int,input().split()))

dp = [[0 for j in range(w+1)] for i in range(n+1)]

for i,[W,V] in enumerate(v[1:],1):
    for j in range(w):
        dp[i][w-1-j] = dp[i-1][w-1-j]
        if w-1-j + W <= w:
            dp[i][w-1-j+W] = max(dp[i][w-1-j]+V, dp[i][w-1-j+W])

ans = 0
for i in range(n+1):
    ans = max(ans, max(dp[i]))
print(ans)
# Judge status: Accepted
def resolve():
    r,g,b=map(int, input().split())
    if eval(str(r)+str(g)+str(b))%4==0:
        print('YES')
    else:
        print('NO')
resolve()
# Judge status: Accepted
X = int(input())
print("Yes") if X >= 30 else print("No")
# Judge status: Accepted
a,b,c,d = map(int,input().split())
print("Yes") if abs(c-a) <= d or (abs(b-a) <= d and abs(c-b) <= d) else print("No")
# Judge status: Accepted
def main():
    now_time, start_in = map(int, input().split())
    print((now_time + start_in) % 24)


if __name__ == '__main__':
    main()
# Judge status: Accepted
def solve():
    N, *P = map(int, open(0).read().split())
    
    ans = 0
    tmp = 10 ** 6
    for i in range(N):
        tmp = min(tmp, P[i])
        if P[i] <= tmp:
            ans += 1
    print(ans)


if __name__ == '__main__':
    solve()
# Judge status: Accepted
A = list(map(int,input().rstrip().split(" ")))
A.sort()
if A[0] == A[1]:
    if A[1] == A[2]:
        print(1)
    else:
        print(2)
else:
    if A[1] == A[2]:
        print(2)
    else:
        print(3)
# Judge status: Wrong Answer
x,y=map(int,input().split())
data=[[1,3,5,7,8,10,12],
      [4,6,9,11],
      [2]]
a=0
b=0
for i in range(0,3):
    for j in range(0,len(data[i])):
        if x==data[i][j]:
            a=i+1
for k in range(0,3):
    for l in range(0,len(data[k])):
        if x==data[k][l]:
            b=k+1
if a==b:
    print('Yes')
else:
    print('No')
# Judge status: Wrong Answer
L, R, d = (int(x) for x in input().split())
a = L // d
b = R // d
if R % d == 0:
    b += 1
print(b - a)
# Judge status: Accepted
import fractions
from functools import reduce

n = int(input())
lst = [0 for _ in range(n)]
for i in range(n):
    lst[i] = int(input())

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

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

def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)

print(lcm_list(lst))
# Judge status: Accepted
S = input()
before = ''
b = 0
c = 0
for i in range(1, len(S)+1):
    if S[b:i] != before:
        before = S[b:i]
        b =i
        c += 1
print(c)
# Judge status: Wrong Answer
import math

N = int(input())
a = [0]+list(map(int, input().split()))
b = [0 for _ in range(N+1)]
for j in range(2, N+1):
    for i in range(N//j+1, N//(j-1)+1):
        b[i] = sum(a[i*k] for k in range(1,j)) % 2
print(sum(b[1:]))
print(*[j for j in b if j == 1])
# Judge status: Accepted
A,B,C,X,Y=map(int,input().split())

ans=[A*X+B*Y,2*C*max(X,Y),2*Y*C+A*max(0,X-Y),2*X*C+B*max(0,Y-X)]
print(min(ans))
# Judge status: Accepted
N ,K = list(map(int, input().split()))
p = list(map(lambda x: (1+int(x))/2, input().split()))
s = [0]*N
s[0]=p[0]
for i in range(1,N):
  s[i] = s[i-1]+p[i]

l = [s[K-1]]
for i in range(N-K):
  l.append(s[i+K]-s[i])

print(max(l))
# Judge status: Accepted
import sys
import itertools

N,M,Ql = map(int, sys.stdin.readline().strip().split())
Q = []
for _ in range(Ql):
    Q.append(list(map(int, sys.stdin.readline().strip().split())))

max = 0
for A in itertools.combinations_with_replacement(range(1,M+1), N):
    ans = 0
    for Qi in Q:
        a,b,c,d = Qi

        if (A[b-1] - A[a-1]) == c:
            ans += d
    if max < ans:
        max = ans

print(max)
# Judge status: Accepted
N = int(input())
dp = [0]

for i in range(1, N + 1):
	cur = min(1 + dp[i - 1], 10 ** 10)
	
	j = 1
	while i - 6 ** j >= 0:
		cur = min(1 + dp[i - 6 ** j], cur)
		j += 1
	
	j = 1
	while i - 9 ** j >= 0:
		cur = min(1 + dp[i - 9 ** j], cur)
		j += 1
		
	dp.append(cur)
	
print(dp[-1])
# Judge status: Wrong Answer
#

import sys
from copy import deepcopy
input=sys.stdin.readline

def main():
    a,b=map(int,input().split())
    if a*b<=0:
        print("Zero")
    elif a>0:
        print("Positive")
    else:
        pm=(-1)*(b-a+1)
        if pm==1:
            print("Positive")
        else:
            print("Negative")
    
if __name__=="__main__":
    main()
# Judge status: Wrong Answer
from collections import Counter
N = int(input())
A = Counter(map(int, input().split()))
ans = 0
for x, y in A.items():
  if y > x:
    ans += y - x
  else:
    ans += y
print(ans)
# Judge status: Accepted
s = input()
t = input()
import sys
if s==t:
    print("No")
    sys.exit()
ss = sorted(list(s))
tt = sorted(list(t))[::-1]
if sorted([ss,tt])[0] == ss:
    print("Yes")
else:
    print("No")
# Judge status: Accepted
print(abs(-int(input())//min(int(input()) for _ in range(5)))+4)
# Judge status: Accepted
import math
a,b,h,m=map(int,input().split())
ang=6*m-30*h-m/2
if ang<0:
    ang*=-1
ang=ang*math.pi/180
#c=math.cos(ang)
#print(c)
r=math.sqrt(a*a+b*b-2*a*b*math.cos(ang))
print(r)
# Judge status: Wrong Answer
n, m = map(int, input().split())
print(n*m - (n*2+m*2-4))