Harryxun/stf_run huggingface dataset:
#include <bits/stdc++.h>
using namespace std;
using ll = long long;

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(0);

    int N;
    cin >> N;
    vector<int> P(N), Q(N);
    for (int i = 0; i < N; i++) cin >> P[i];
    for (int i = 0; i < N; i++) cin >> Q[i];
    vector<int> perm(N);
    for (int i = 0; i < N; i++) perm[i] = i + 1;
    int n = 0;
    int a, b;
    do {
        if (perm == P) a = n;
        if (perm == Q) b = n;
        n++;
    } while (next_permutation(perm.begin(), perm.end()));
    cout << abs(a - b) << endl;
}

### FIXED CODE ###

def generate_perms(n, perms):
    if n == 0:
        return perms
    new_perms = []
    for perm in perms:
        for i in range(1, N+1):
            if i not in perm:
                p = list(perm)
                p.append(i)
                new_perms.append(p)
    return generate_perms(n-1, new_perms)


N = int(input())
P = list(map(int, input().split()))
Q = list(map(int, input().split()))
perms = generate_perms(N, [[]])
print(abs(perms.index(P) - perms.index(Q)))
a = map(str,input())
b = len(a)
i = 0
while i<=b:
    c = a[i]
    if c==7:
        print('yes')
        break
    
    i += 1
    if i==b:
        print('no')

### FIXED CODE ###

a = input()
if '7' in a:
   print('Yes')
else:
   print('No')
N = int(input())
D = list(map(int, input().split()))
M = 998244353
from collections import Counter

if D[0] != 0:
    print(0)
    exit(0)

if D[1:].index(0):
    print(0)
    exit(0)

cd = Counter(D)
tmp = sorted(cd.items(), key=lambda x: x[0])

ans = 1
# for kx in range(2, len(tmp)):
#     __, p = tmp[kx-1]
#     _, v = tmp[kx]
#     while v > 0:
#         ans *= p%M
#         v -= 1
# print(cd)
for kx in range(1, len(tmp)-1):
    _, p = tmp[kx]
    __, v = tmp[kx+1]
    # ans *= p**v%M
    while v > 0:
        ans *= p%M
        v -= 1

print(ans%M)

### FIXED CODE ###

N = int(input())
D = list(map(int, input().split()))
M = 998244353
from collections import Counter

if D[0] != 0:
    print(0)
    exit(0)

cd = Counter(D)
if cd[0] != 1:
    print(0)
    exit(0)

tmp = sorted(cd.items(), key=lambda x: x[0])

ans = 1


for kx in range(1, max(D)+1):
    ans *= pow(cd[kx-1], cd[kx],M)
    ans %= M

print(ans)
import fractions
A, B, C, D = (int(x) for x in input().split())

C_ = int(B/C) - int(A/C)
if A%C == 0:                                                                                                                                                                                                
    C_ += 1                                                                                                                                                                                                 
D_ = int(B/D) - int(A/D)
if A % D == 0:                                                                                                                                                                                              
    D_ += 1                                                                                                                                                                                                 

E = C * D / fractions.gcd(C, D)
E_ = int(B/E) - int(A/E)

ans = B - A + 1 - C_ - D_ + E_
print(ans)


### FIXED CODE ###

import sys
s = input()

for i in range(3):                                                                                                                                                                                          
    if s[i] == s[i+1]:                                                                                                                                                                                      
        print('Bad')                                                                                                                                                                                        
        sys.exit()                                                                                                                                                                                          
print('Good')
2 2

### FIXED CODE ###

import math
a,b=map(int,input().split())
for i in range(1,1009):
	A=math.floor(i*0.08)
	B=math.floor(i*0.1)
	if a==A and b==B:
		print(i)
		exit()
print(-1)
str = input();
if　str=="ABC":
  print("ARC")
elif str=="ARC":
  print("ABC")


### FIXED CODE ###

val = input()
if val=="ABC":
  print("ARC")
elif val=="ARC":
  print("ABC")
#d
N = int(input())
A = list(map(int, input().split()))
Q = int(input())
B = [0] * Q
C = [0] * Q
for i in range(Q):
    B[i], C[i] = map(int, input().split())
D = [0] * (10**5)
ans=sum(A)
for i in A:
    D[i]+=1
for x in range(Q):
    ans+=D[B[x]]*(C[x]-B[x])
    print(ans)
    D[C[x]]+=D[B[x]]
    D[B[x]]=0

### FIXED CODE ###

#d
N = int(input())
A = list(map(int, input().split()))
Q = int(input())
B = [0] * Q
C = [0] * Q
for i in range(Q):
    B[i], C[i] = map(int, input().split())
D = [0] * (10**5+1)
ans=sum(A)
for i in A:
    D[i]+=1
for x in range(Q):
    ans+=D[B[x]]*int(C[x]-B[x])
    print(ans)
    D[C[x]]+=D[B[x]]
    D[B[x]]=0
# -*- coding: utf-8 -*-
# get a integer
num = int(raw_input())
# get two integers separated with half-width break
array = map(int, raw_input().split())
# get a string
#s = raw_input()

for i in range(0,num):
    state = 0
    way = 0
    for j in range(0,num):
        if i != j:
            if !(j+1 < num and state <= array[j] and array[j] <= array[j+1]) 
                and !(j+1 < num and state >= array[j] and array[j] >= array[j+1]):
                way += abs(array[j] - state)
                state = array[j]
    way += abs(state)
    print(way)


### FIXED CODE ###

# -*- coding: utf-8 -*-
# get a integer
num = int(raw_input())
# get two integers separated with half-width break
array = map(int, raw_input().split())
# get a string
#s = raw_input()

state = 0
way_total = 0
for j in range(0,num):
    way_total += abs(array[j] - state)
    state = array[j]
way_total += abs(state)

for i in range(0,num):
    if i != num - 1 and i != 0:
        way = way_total - abs(array[i-1] - array[i]) - abs(array[i+1] - array[i]) + abs(array[i-1] - array[i+1])
    elif i == 0:
        way = way_total - abs(array[i])- abs(array[i+1] - array[i]) + abs(array[i+1])
    elif i == num - 1:
        way = way_total - abs(array[i-1] - array[i]) - abs(array[i]) + abs(array[i-1] - 0)
    print(way)
N = int(input())
p = list(map(int,input().split()))

ans = 0

for i in range(N):
	if p[N] == (N+1) :
		ans += 1

if ans == N or N-2:
	print('YES')
else :
	print('NO')


### FIXED CODE ###

N = int(input())
p = list(map(int,input().split()))
 
ans = 0
 
for i in range(N):
    if p[i] != (i+1) :
        ans += 1
 
if ans == 0:
    print('YES')
elif ans == 2:
      print('YES')
else :
    print('NO')
import math
print(math.pow(map(int,input())))


### FIXED CODE ###

print(int(pow(*map(int,input().split()),10**9+7)))
def examC():
    N, M = LI()
    A = [I() for _ in range(M)]
    A.append(N+1)
    fib = [1]*(N+1)
    for i in range(1,N-1):
        fib[i+2] = fib[i+1] + fib[i]
    fib[0] = 0
#    print(fib)
    ans = fib[A[0]]
    for i in range(M):
        ans *= fib[A[i+1]-A[i]-1]
        ans %=mod
    print(ans)
    return

def examD():
    return

import sys,copy,bisect,itertools,heapq,math
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict,deque
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))
def LSI(): return list(map(str,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def SI(): return sys.stdin.readline().strip()
global mod,inf
mod = 10**9 + 7
inf = float('inf')

if __name__ == '__main__':
    examC()


### FIXED CODE ###

def examC():
    N, M = LI()
    A = [I() for _ in range(M)]
    A.append(N+1)
    fib = [1]*(N+2)
    for i in range(1,N):
        fib[i+2] = fib[i+1] + fib[i]
    fib[0] = 0
#    print(fib)
    ans = fib[A[0]]%mod
    for i in range(M):
        ans *= fib[A[i+1]-A[i]-1]
        ans %=mod
    print(ans)
    return

def examD():
    return

import sys,copy,bisect,itertools,heapq,math
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict,deque
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))
def LSI(): return list(map(str,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def SI(): return sys.stdin.readline().strip()
global mod,inf
mod = 10**9 + 7
inf = float('inf')

if __name__ == '__main__':
    examC()
from collections import deque

x,y,a,b,c = map(int,input().split())
p = list(map(int,input().split()))
q = list(map(int,input().split()))
r = list(map(int,input().split()))
p.sort()
q.sort()
r.sort(reverse=True)
xlis = deque(p[len(p)-x:])
ylis = deque(q[len(q)-y:])
r = deque(r)
while True:
    xs = xlis.popleft()
    ys = ylis.popleft()
    rm = r.popleft()
    if rm < xs and rm < ys:
        xlis.append(xs)
        ylis.append(ys)
        break
    if xs < ys and xs < rm:
        xlis.append(rm)
        ylis.append(ys)
    elif ys < xs and ys < rm:
        ylis.append(rm)
        xlis.append(xs) 
print(sum(xlis)+sum(ylis))

### FIXED CODE ###

X, Y, A, B, C = map(int, input().split())
P = sorted(list(map(int, input().split())), reverse = True)
Q = sorted(list(map(int, input().split())), reverse = True)
R = list(map(int, input().split()))

a = sorted(P[:X] + Q[:Y] + R, reverse  = True)
print(sum(a[:(X+Y)]))
from collections import deque
import heapq
n, k = map(int, input().split())
v = list(map(int, input().split()))

result = []
for i in range(k):
    for j in range(k-i):
        jue = []
        heapq.heapify(jue)
        for ii in range(i):
            heapq.heappush(jue, v[ii])
        for jj in range(j):
            heapq.heappush(jue, v[-jj-1])
        for le in range(min(k-i-j, len(jue))):
            heapq.heappop(jue)
        result.append(sum(jue))

print(max(result))

### FIXED CODE ###

import heapq
n, k = map(int, input().split())
v = list(map(int, input().split()))

result = []
for i in range(min(n, k)+1):
    for j in range(min(n, k)+1-i):
        x = v[:i]+v[n-j:]
        c = k - (i + j)
        x.sort()
        for t in range(min(len(x), c)):
            if x[0]<0:
                x.pop(0)
            else:
                break
        result.append(sum(x))
print(max(result))
A,B = map(int,input().split())
b = format(B, "b")
d_num = len(b)
a = [0]*(B-A + 1)
a[-1] = b
digit_list = [0]*d_num
for i in range(B-A):
  a[i] = format(A + i,"0"+str(d_num) + "b")
for i in range(len(a)):
    digit_list = map(sum,zip(digit_list,[int(c) for c in a[i]])) 
result = [1 if digit % 2 != 0 else 0 for digit in digit_list]
print(int(''.join(map(str,result)),2))

### FIXED CODE ###

def solver(N):
  if N % 2 == 1:
    return oddodd(N)
  else:
    return (N+1) ^ oddodd(N+1)

def oddodd(N):
  return 1 if (N+1)/2 % 2 == 1 else 0 

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

print(solver(B) ^ solver(A-1))
if __name__=="__main__":
    s	= int(input().split()[0])
    q =	int(s / 11)
    r =	s % 11
    if(r!=0):
	r = int((r-1)/6 + 1)
    print(2*q + r)

### FIXED CODE ###

if __name__=="__main__":
    [s] = map(int, input().split())
    q = int(s / 11)
    r = s % 11
    if(r!=0):
        r = int((r-1)/6 + 1)
    print(2*q + r)
s = input()
t = input()

S = s.copy()
while len(S) < len(t):
    S = S + s

s = S+S

ans = 0
j = 0
c = 0
for i in range(len(s)):
    if s[i]==t[j]:
        j += 1
        if j == len(t):
            j = 0
            c += 1
            ans = max(ans,c)
    else:
        j = 0
        c = 0


s = s+s
ans_ = 0
j = 0
c = 0
for i in range(len(s)):
    if s[i]==t[j]:
        j += 1
        if j == len(t):
            j = 0
            c += 1
            ans_ = max(ans_,c)
    else:
        j = 0
        c = 0

if ans != ans_:
    ans = -1

print(ans)

### FIXED CODE ###

from collections import defaultdict
def Z(S):
    res = [0]*len(S)
    res[0] = len(S)
    i = 1
    j = 0
    while i < len(S):
        while i+j < len(S) and S[j] == S[i+j]:
            j += 1
        res[i] = j
        if j == 0:
            i += 1
            continue
        k = 1
        while i+k < len(S) and k+res[k] < j:
            res[i+k] = res[k]
            k += 1
        i += k
        j -= k
    return res

class UnionFind:
    def __init__(self, num):
        self.table = [-1 for _ in range(num)]

    def find(self, x):
        if self.table[x] < 0:
            return x
        else:
            self.table[x] = self.find(self.table[x])
            return self.table[x]

    def union(self, x, y):
        s1 = self.find(x)
        s2 = self.find(y)

        if s1 != s2:
            if self.table[s1] <= self.table[s2]:
                self.table[s1] += self.table[s2]
                self.table[s2] = s1
            else:
                self.table[s2] += self.table[s1]
                self.table[s1] = s2
            return True
        return False

s = input()
t = input()

S = s*(len(t)//len(s)+2)
z = Z(t+'*'+S)
z = z[len(t)+1:]

u = UnionFind(len(s))

for i in range(len(s)):
    j = (i+len(t))%len(s)
    if z[i] == len(t) and z[j] == len(t):
        u.union(i,j)

d = defaultdict(list)
for i in range(len(s)):
    if z[i] == len(t):
        d[u.find(i)].append(i)

ans = 0
for k in d:
    loop = True
    if len(d[k])==1:
        loop = len(t)%len(s)==0
    else:
        for i in d[k]:
            j = (i+len(t)*(len(d[k])-1))%len(s)
            loop = z[j]==len(t) and loop
    if loop:
        ans = -1
        break
    ans = max(ans,len(d[k]))

print(ans)
f"{T}{S}"

### FIXED CODE ###

a = input().split()
print(f"{a[1]}{a[0]}")
n, m = map(int, input().split())
ans = 999999
for _ in range(n):
  c, t = map(int, input().split())
  if t > m:
    continue
  ans = min(ans, c)
if ans = 999999:
  print('TLE')
else:
  print(ans)

    

### FIXED CODE ###

n, m = map(int, input().split())
ans = 999999
for _ in range(n):
    c, t = map(int, input().split())
    if t > m:
        continue
    ans = min(ans, c)
if ans == 999999:
    print('TLE')
else:
    print(ans)
a = input()
b = input()
print(int(a) * int(b) (int(a) + int(b)) * 2)


### FIXED CODE ###


a,b =(int(x) for x in input().split())
print(a * b, (a+b) * 2)
a,b=(iny(x) for x in input().split())

if a%3==0 or b%3==0 or a+b%3==0:
    print("Possible")
else:
    print("Impossible")

    

### FIXED CODE ###

a,b=(int(x) for x in input().split())

if a%3==0 or b%3==0 or (a+b)%3==0:
    print("Possible")
else:
    print("Impossible")
a,b,c = [for int(i) in input().split()]
i=0
for i in list(range(a,b+1,1):
    if c % i == 0:
        i = i+1
    else:
        
print(i)


### FIXED CODE ###

a,b,c = [int(i) for i in input().split()]
i=0
for num in range(a,b+1,1):
    if c % num == 0:
        i = i+1
    else:
        pass
print(i)
n, k = map(int, input().split())
_sum = list(map(int, input().split()))
m, f = 0, 0
for i in range(40, -1, -1):
  _sum = sum(map(lambda x: (x >> i) & 1, _sum))
  _min = min(_sum, n-_sum) << i
  _max = max(_sum, n-_sum) << i
  s = 0 if _sum > n//2 else 1 << i
  if s > max(k - m, 0):
    f += _min
  elif s > 0:
    m += s
    f += _max
  else:
    f += _max
print(f)

### FIXED CODE ###

n, k = map(int, input().split())
a = list(map(int, input().split()))
_sum = [0]*41
ans = 0
f = 0
 
for x in a:
  for i in range(41):
    _sum[i] += (x >> i) & 1
for i in range(41):
  if _sum[i] <= n//2:
    _sum[i] = 1
  else:
    _sum[i] = 0
for i in range(40, -1, -1):
  s = _sum[i] << i
  ans += s
  if ans > k:
    ans -= s
for x in a:
  f += x ^ ans
print(f)
n = int(input())
a = [int(input()) for i in range(n)]
mod = 998244353
sm = sum(a)
dp = [[0 for i in range(sm+1)] for j in range(n+1)]
dp2 = [[0 for i in range(sm+1)] for j in range(n+1)]
dp[0][0] = 1
dp2[0][0] = 1
for i in range(1,n+1):
  x = a[i-1]
  dp2[i] = dp2[i-1][:]
  for j in range(sm+1):
    dp[i][j] = dp[i-1][j]*2
    if j >= x:
      dp[i][j] += dp[i-1][j-x]
      dp2[i][j] += dp2[i-1][j-x]
    dp[i][j] %= mod
    dp2[i][j] %= mod
ans = pow(3,n,mod)-sum(dp[-1][(sm+1)//2:])*3
if sm%2:
  print(ans%mod)
else:
  print(2/0)
  print((ans+dp2[-1][sm//2]//2*6)%mod)

### FIXED CODE ###

n = int(input())
a = [int(input()) for i in range(n)]
mod = 998244353
sm = sum(a)
dp = [[0 for i in range(sm+1)] for j in range(n+1)]
dp2 = [[0 for i in range(sm+1)] for j in range(n+1)]
dp[0][0] = 1
dp2[0][0] = 1
for i in range(1,n+1):
  x = a[i-1]
  dp2[i] = dp2[i-1][:]
  for j in range(sm+1):
    dp[i][j] = dp[i-1][j]*2
    if j >= x:
      dp[i][j] += dp[i-1][j-x]
      dp2[i][j] += dp2[i-1][j-x]
    dp[i][j] %= mod
    dp2[i][j] %= mod
ans = pow(3,n,mod)-sum(dp[-1][(sm+1)//2:])*3
if sm%2:
  print(ans%mod)
else:
  print((ans+dp2[-1][sm//2]*(mod+1)//2*6)%mod)
n = int(input())
w = [input() for i in range(n)]
bl = True
if len(w) != len(set(w)):
    bl = False
for i in range(n-1):
    if w[i][1] != w[i+1][0]:
        bl = False
print("Yes" if bl else"No")

### FIXED CODE ###

n = int(input())
w = [input() for i in range(n)]
bl = True
if len(w) != len(set(w)):
    bl = False
for i in range(n-1):
    if w[i][-1] != w[i+1][0]:
        bl = False
print("Yes" if bl else"No")
a, b, x =map(int, inpit().split())

if a > x:
  print('No')
else:
  if a + b < x:
    print('No')
  else:
    print('Yes')

### FIXED CODE ###

a, b, x =map(int, input().split())

if 0 <= x-a <= b:
  print('YES')
else:
  print('NO')
data = [int(k) for k in input().split()]

A = data[0]
B = data[1]
K = data[2]

Abooks = [int(k) for k in input().split()]
Bbooks = [int(k) for k in input().split()]


time = 0
nbOfBooks = 0

while (time + Bbooks[0]) <= K or (time + Abooks[0])  <= K:
	
		
	if Abooks[0] >= Bbooks[0]:
		
		time += Bbooks[0]
		
		if len(Bbooks) == 1:
			Bbooks[0] = 10**9+1
		else:

			Bbooks.pop()
		
		nbOfBooks += 1

	else:
		
		time += Abooks[0]
		
		if len(Abooks) == 1:
			Abooks[0] = 10**9+1
		
		else:

			Abooks.pop()
		nbOfBooks += 1 


print(nbOfBooks)

### FIXED CODE ###

nb = int(input())
print(str(nb + nb**2 + nb**3))
N,K = list(map(int,input().split()))
A = list(map(int,input().split()))
F = list(map(int,input().split()))

A.sort()
F.sort(reverse = True)

M = 0
for i in range(N):
    M=max(F[i]*A[i],M)

def judge(n):
    score = 0
    for i in range(N):
        score += max(A[i] - n//F[i],0)
    return score<=K

def bisect(l,r):
    while r-l>1:
        if judge((l+r)//2):
            r = (l+r)//2
        else:
            l = (l+r)//2
    return r

if judge(0):
    print(0)
else:
    print(bisect(0,M))


### FIXED CODE ###

import sys

def input():
    return sys.stdin.readline()[:-1]

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

    e_list = [[] for i in range(N)]

    for i in range(M):
        s,t = list(map(int,input().split()))
        s,t = s-1,t-1
        e_list[s].append(t)

    DP = [0]*N
    dp0_min = 10**27

    for x in range(N-1):
        for i in range(N-1):
            if i==x:
                if len(e_list[N-i-2])==1:
                    DP[N-i-2] = DP[e_list[N-i-2][0]]+1
                else:
                    max_room = -1
                    max_path = 0
                    for j in e_list[N-i-2]:
                        if max_path<DP[j]:
                            max_room = j
                            max_path = DP[j]
                        DP[N-i-2] += DP[j]
                    DP[N-i-2] -= DP[max_room]
                    DP[N-i-2] /= len(e_list[N-i-2])-1
                    DP[N-i-2] += 1
            else:
                for j in e_list[N-i-2]:
                    DP[N-i-2] += DP[j]
                DP[N-i-2] /= len(e_list[N-i-2])
                DP[N-i-2] += 1
        dp0_min = min(dp0_min,DP[0])
        DP = [0]*N
    print(dp0_min)

if __name__ == '__main__':
    main()
a=list(input())

IN=[int(x) for x in a if x != " "]
N=IN[0]
A=IN[1]
B=IN[2]

Times = N // (A + B)
rest = N % (A + B)

if rest < A:
        ans = A * Times + rest
else:
        ans = A * Times + A

print(ans)


### FIXED CODE ###

N, A, B = [int(x) for x in input().strip().split()]

Times = N // (A + B)
rest = N - Times * (A + B)

if rest < A:
        ans = A * Times + rest
else:
        ans = A * Times + A

print(ans)
s = int(input())
print(s.count('1'))

### FIXED CODE ###

print(input().count('1'))
l,r=map(int,input().split())
i=l//2019
d=list(range(l,r+1))
for j in range(len(d)):
    d[j]%=2019
    d2=sorted(d)
    print(d2[0]*d2[1])


### FIXED CODE ###

l,r=map(int,input().split())
x=l//2019
if 2019*x<l and r<2019*(x+1):
    ans=float("inf")
    for i in range(l,r):
        for j in range(i+1,r+1):
            ans=min(ans,(i*j)%2019)
    print(ans)
else:
    print(0)
import numpy as np

class union_find:
    def __init__(self,N):
        self.r = np.ones(N)*-1
    
    def root(self,x):
        if self.r[x]<0:
            return int(x)
        else:
            self.r[x] = self.root(int(self.r[x]))
            return int(self.r[x])
        
    def unite(self,x,y):
        x = self.root(x)
        y = self.root(y)
        if x == y:
            return False
        else:
            self.r[x] += self.r[y]
            self.r[y] = int(x)
            return True
        
    def size(self,x):
        return -self.r[self.root(x)]


N,M = [int(i) for i in input().split()]

Union = union_find(N)
for i in range(M):
    x,y = [int(i) for i in input().split()]
    Union.unite(x-1,y-1)

Y = 0
for i in range(N):
    Y = max(Y,Union.size(i))
print(int(Y))

### FIXED CODE ###

import numpy as np

class union_find:
    def __init__(self,N):
        self.r = np.ones(N)*-1
    
    def root(self,x):
        if self.r[x]<0:
            return int(x)
        else:
            self.r[x] = self.root(int(self.r[x]))
            return int(self.r[x])
        
    def unite(self,x,y):
        x = self.root(x)
        y = self.root(y)
        if x == y:
            return False
        else:
            self.r[x] += self.r[y]
            self.r[y] = int(x)
            return True
        
    def size(self,x):
        return -self.r[self.root(x)]


N,M = [int(i) for i in input().split()]

Union = union_find(N)
for i in range(M):
    x,y = [int(i) for i in input().split()]
    Union.unite(x-1,y-1)

Y = - min(Union.r)
print(int(Y))
from functions import gcd 
from functools import reduce

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

print(reduce(gcd,A))

### FIXED CODE ###

from functools import reduce

N=int(input())
A=list(map(int,input().split()))
def gcd(a,b):
    while b!=0:
        a,b=b,a%b
    return a
print(reduce(gcd,A))
r,g,b = int(input())

a = 100*r + 10*g + b

if a%4 == 0:
  m = "YES"
else:
  m = "NO"
  
print(m)

### FIXED CODE ###

r,g,b = map(int,input().split())
 
a = 100*r + 10*g + b
 
if a%4 == 0:
  m = "YES"
else:
  m = "NO"
  
print(m)
a = int(input())
b = int(input())

print(a*b)

### FIXED CODE ###

a,b = input().split()

a = int(a)
b = int(b)

print(a*b)
# -*- coding: utf-8 -*-
"""
Created on Wed Mar 25 10:13:10 2020

@author: Kanaru Sato
"""

N = int(input())
H = list(map(int, input().split()))
record = 0
count = 0

for i in range(0,N-1):
    if H[i] >= H[i+1]:
        count += 1
        ans = max(record,count)
    else:
        count = 0

print(ans)

### FIXED CODE ###

# -*- coding: utf-8 -*-
"""
Created on Wed Mar 25 10:13:10 2020

@author: Kanaru Sato
"""

N = int(input())
H = list(map(int, input().split()))
ans = 0
count = 0

for i in range(0,N-1):
    if H[i] >= H[i+1]:
        count += 1
        ans = max(ans,count)
    else:
        count = 0

print(ans)
n = list(map(int,input().split()))
m = list(map(int,input().split()))

a = []
kaku = []
for x in range(n[1]) :
    a.append(list(map(int, input().split())))

kaku = [0]* len(m)
cou = 0

for x in range(n[1]):
    if m[a[x][0] -1 ] > m[a[x][1] -1 ]:
        kaku[a[x][0] -1 ] += 1
    else:
        kaku[a[x][0] - 1] -= 1000000

    if m[a[x][1] -1 ] > m[a[x][0] -1 ]:
        kaku[a[x][1] -1 ] += 1
    else:
        kaku[a[x][1] - 1] -= 1000000

for x in range(len(m)):
    if kaku[x] >= 0 :
        cou += 1

print(cou)


### FIXED CODE ###

n = input()

if n == "ABC":
    print("ARC")
else:
    print("ABC")
N = int(input())
A = int(input())
B = int(input())
 
if N == 2:
  print(A+B)
elif N ==1:
  print("Hello World")

### FIXED CODE ###

N = int(input())
if N ==1:
  print("Hello World")
elif N == 2:
  A = int(input())
  B = int(input())
  print(A+B)