Harryxun/stf_run huggingface dataset:
import sys, os, time, math
import numpy as np
import pandas as pd


print("Start")
N = list(map(str, input().split()))
# N = np.array(list(map(int, input().split())))
# print(N, K)
print(N)

if (N[0][0] == "7") or (N[0][1] == "7") or (N[0][2] == "7"):
    print("Yes")
else:
    print("No")


### FIXED CODE ###

N = input()
# N = N[0]
# N = np.array(list(map(int, input().split())))
# print(N, K)
# print(N)
 
if (N[0] == "7") or (N[1] == "7") or (N[2] == "7"):
    print("Yes")
else:
    print("No")
n,m = map(int, input().split())
x= list(map(int,input().split()))

if n>=m:
    print('0')
    exit()

x.sort()

y=[0]*(m-1)
for i in range(m-1):
    y[i]=x[i+1]-x[i]
if n==1:
    print(sum(y))
    exit()
y.sort(reverse=True)
for i in range(n-1):
    del y[i]
print(sum(y))


### FIXED CODE ###

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

if n>=m:
    print('0')
    exit()

x.sort()

y=[0]*(m-1)
for i in range(m-1):
    y[i]=x[i+1]-x[i]
if n==1:
    print(sum(y))
    exit()
y.sort(reverse=True)
for i in range(n-1):
    y[i]=0
print(sum(y))
n=int(input())
a=list(map(int,input().split()))
a.sort()
negative=[]
positive=[]
for ele in a:
    if ele<0:
        negative.append(ele)
    else:
        positive.append(ele)
if len(negative)==0:
    print(sum(a))
else:
    if len(negative)%2==0:
        print(-sum(negative)+sum(positive))
    else:
        if (-1)*negative[-1]>positive[0]:
            print(-sum(negative)+sum(positive[1:])-positive[0])
        else:
            print(-sum(negative[:-1])+sum(positive)+negative[-1])


### FIXED CODE ###

n=int(input())
a=list(map(int,input().split()))
a.sort()
negative=[]
positive=[]
for ele in a:
    if ele<0:
        negative.append(ele)
    else:
        positive.append(ele)
if len(negative)==0:
    print(sum(a))
else:
    if len(negative)%2==0:
        print(-sum(negative)+sum(positive))
    else:
        if len(positive)==0:
            print(-sum(negative)+2*negative[-1])
        elif -negative[-1]>positive[0]:
            print(-sum(negative)+sum(positive[1:])-positive[0])
        else:
            print(-sum(negative[:-1])+sum(positive)+negative[-1])
import numpy as np

n = int(input())
a = input().split()

c1 = a.count('1')
c2 = a.count('2')
c3 = a.count('3')

# dp =[ [[-1] * (n+1) for _ in range(n+1)] for __ in range(c3+1)]
dp = np.full((c3+1, c2+c3+1, n+1), -1.0)
dp[0][0][0] = 0

def calc_dp(t3,t2,t1):
    global dp
    if(dp[t3][t2][t1] > -1):
        return dp[t3][t2][t1]

    temp = 0
    if(t3 > 0):
        temp += calc_dp(t3-1,t2+1,t1) * t3/(t1+t2+t3)
    if(t2 > 0):
        temp += calc_dp(t3,t2-1,t1+1) * t2/(t1+t2+t3)
    if(t1 > 0):
        temp += calc_dp(t3,t2,t1-1) * t1/(t1+t2+t3)
    temp = temp + n/(t1+t2+t3)

    dp[t3][t2][t1] = temp
    return temp

print(calc_dp(c3,c2,c1))

### FIXED CODE ###

n = int(input())
a = input().split()

c1 = a.count('1')
c2 = a.count('2')
c3 = a.count('3')

dp =[ [[0] * (n+1) for _ in range(c3+c2+1)] for __ in range(c3+1)]
# dp[0][0][0] = 0

for i in range(c3+1):
    for j in range(c3+c2+1-i):
        for k in range(n+1-i-j):
            if(i+j+k == 0):
                dp[i][j][k]=0
            else:
                temp = 0
                if(i > 0):
                    temp += dp[i-1][j+1][k] * i/(k+j+i)
                if(j > 0):
                    temp += dp[i][j-1][k+1] * j/(k+j+i)
                if(k > 0):
                    temp += dp[i][j][k-1] * k/(k+j+i)
                dp[i][j][k] = temp + n/(k+j+i)

print(dp[c3][c2][c1])
n, p = map(int, input().split())

if n == 1:
    print(p)
else:
    ans = 1
    g = 1
    while True:
        t = g**n
        if t > p: break
        if p%t == 0:
            ans = max(ans, g)
        g += 1
    print(ans)



### FIXED CODE ###

def prime_factor(n):
    ret = {}
    p = 2
    while p*p <= n:
        while n % p == 0:
            ret[p] = ret.get(p, 0) + 1
            n //= p
        p += 1
    if n != 1: ret[n] = 1
    return ret

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

primes = prime_factor(p)
ans = 1

for p, e in primes.items():
    ans *= max(1, p**(e//n))

print(ans)
def a(s,i):
    if i == l-1:
        return sum(map(int,s.split("+")))
    return a(s+s[i+1],i+1)+a(s+"+"+s[i+1],i+1)
s = input()
l = len(s)
print(a(s[0],0))

### FIXED CODE ###

def dfs(i,s):
    if i==n-1:
        return sum(map(int,s.split('+')))
    return dfs(i+1,s+S[i+1])+dfs(i+1,s+'+'+S[i+1])

S=input()
n=len(S)
ans=dfs(0,S[0])
print(ans)
from collections import deque
N,K = list(map(int,input().split()))
S = list(input())
S = deque(S)
i = 0
ans = 0
S_2 = [S.popleft()]
while len(S) > 0:
    if S[0] == S_2[-1]:
        ans += 1
        S.popleft()
    else:
        S_2.append(S.popleft())
cnt = 0

for i in range(1,len(S_2)-1):
    if S_2[i] != S_2[i-1] and S_2[i] != S_2[i+1]:
        ans += 2
        K -= 1
        S_2[i] = S_2[i-1]
        if K ==0:
            break
if K > 0:
    if len(S_2) == 1:
        print(ans)
    elif len(S_2) == 2 and S_2[0] != S_2[1]:
        print(ans + 1)
    else:
        if (S[0] != S[1] or S[-1] != S[-2]) and K == 1:
            print(ans + 1)
        elif K > 1 and (S[0] != S[1] and S[-1] != S[-2]):
            print(ans + 2)
        elif K > 1 and (S[0] != S[1] and S[-1] == S[-2]) or (S[0] == S[1] or S[-1] != S[-2]):
            print(ans + 1)
        else:
            print(ans)
else:
    print(ans)

### FIXED CODE ###

from collections import deque
N,K = list(map(int,input().split()))
S = list(input())
S = deque(S)
ans = 0
S_2 = [S.popleft()]
while len(S) > 0:
    if S[0] == S_2[-1]:
        ans += 1
        S.popleft()
    else:
        S_2.append(S.popleft())
cnt = 0

for i in range(1,len(S_2)-1):
    if S_2[i] != S_2[i-1] and S_2[i] != S_2[i+1]:
        ans += 2
        K -= 1
        S_2[i] = S_2[i-1]
        if K ==0:
            break
if len(S_2) == 1:
    print(ans) 
elif len(S_2) == 2:
    if S_2[0] == S_2[1] or K == 0:
        print(ans)
    else:
        print(ans + 1)
else:
    if S_2[0] != S_2[1] and S_2[-1] != S_2[-2] and K > 1:
        print(ans + 2)
    elif K == 0 or (S_2[0] == S_2[1] and S_2[-1] == S_2[-2]):
        print(ans)
    else:
        print(ans + 1)
from collections import deque

MOD = 10 ** 9 + 7
ans = 1

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

if n == k:
    for x in a:
        ans *= x
    print(ans % MOD)
    exit()

p = []
m = []

for x in a:
    if x >= 0:
        p.append(x)
    else:
        m.append(x)

p.sort(reverse=True)
m.sort()

pos = deque(p)
neg = deque(m)

if len(p) == 0:
    for i in range(k):
        ans *= neg[-1]
        neg.pop()
    print(ans % MOD)
    exit()

if k % 2:
    ans *= pos.popleft()
    k -= 1

while k > 0:
    if len(pos) >= 2:
        sp = pos[0] * pos[1]
    else:
        sp = 0
    
    if len(neg) >= 2:
        sn = neg[0] * neg[1]
    else:
        sn = 0
    
    if sp > sn:
        ans *= sp
        pos.popleft()
        pos.popleft()
    else:
        ans *= sn
        neg.popleft()
        neg.popleft()
    
    ans %= MOD
    k -= 2

print(ans % MOD)


### FIXED CODE ###

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

MOD = 10 ** 9 + 7
ans = 1

#全部取る
if n == k:
    for x in a:
        ans *= x
        ans %= MOD
    print(ans % MOD)

#全部負かつ奇数個取る
elif max(a) < 0 and k % 2:
    a.sort()
    for i in range(1, k+1):
        ans *= a[-i]
        ans %= MOD
    print(ans % MOD)

else:
    pos = []
    neg = []
    
    for x in a:
        if x >= 0:
            pos.append(x)
        else:
            neg.append(x)
    
    pos.sort(reverse=True)
    neg.sort()
    
    
    if k % 2:
        ans *= pos.pop(0)
        k -= 1
     
    #2個ずつ取る
    num = []
    for x, y in zip(pos[::2], pos[1::2]):
        num.append(x * y)
    for x, y in zip(neg[::2], neg[1::2]):
        num.append(x * y)

    num.sort(reverse=True)

    for i in range(k // 2):
        ans *= num[i]
        ans %= MOD
    
    print(ans % MOD)
n = int(input())
l = list(map(int, input().split()))

for i in range(n):
    for j in range(i, n - i):
        a = l[i]
        b = l[j]
        for k in range(j, n - i - j):
            c = l[k]
            if (a < b + c) and (b < c + a) and (c < a + b):
                ans += 1

print(ans)


### FIXED CODE ###

from bisect import bisect_left

n = int(input())
l = list(map(int, input().split()))

ans = 0
l.sort()

for i in range(n):
    for j in range(i + 1, n):
        a = l[i]
        b = l[j]
        idx = bisect_left(l, a + b)
        # print(a, b, idx)

        ans += idx - (j + 1)


print(ans)
# -*- coding: utf-8 -*-


def main():
    A, B = [int(_) for _ in input().split()]

    product = A * B
    for divisor in range(min([A, B]) // 2, 1, -1):
        if A % divisor == 0 and B % divisor == 0:
            A = A // divisor
            B = B // divisor
            product = product // divisor

    print(product)


if __name__ == "__main__":
    main()


### FIXED CODE ###

# -*- coding: utf-8 -*-


def main():
    A = int(input())
    B = int(input())

    print('{}'.format(6 - A - B))


if __name__ == "__main__":
    main()
X,N=map(int,input().split())
P = list(map(int,input().split()))
value = float('inf')
if(N==0):
    print(X)
    exit()
ans_value= 100
for i in range(-1,102):
    if (i not in P):
        if(abs(X-i)<value):
            value=abs(X-i)
            ans_value=i
print(ans_value)

X,N=map(int,input().split())
P = list(map(int,input().split()))
value = float('inf')
if(N==0):
    print(X)
    exit()
ans_value= 100
for i in range(-1,102):
    if (i not in P):
        if(abs(X-i)<value):
            value=abs(X-i)
            ans_value=i
print(ans_value)



### FIXED CODE ###

X,N=map(int,input().split())
P = list(map(int,input().split()))
value = float('inf')
if(N==0):
    print(X)
    exit()
ans_value= 101
for i in range(0,102):
    if (i not in P):
        if(abs(X-i)<value):
            value=abs(X-i)
            ans_value=i
print(ans_value)
R,G,B,N=map(int,input().split())
R,G,B,N=map(int,input().split())

ans=[]

count=0
for r in range(int(N/R)+1):
    for g in range(int((N-r*R)/G)+1):
        
        if (N-r*R-g*G)%13B==0:
            count+=1
            #ans.append([r,g,(N-r*R-g*G)/B])

#print(ans)
print(count)

### FIXED CODE ###

R,G,B,N=map(int,input().split())

ans=[]

count=0
for r in range(int(N/R)+1):
    for g in range(int((N-r*R)/G)+1):
        
        if (N-r*R-g*G)%B==0:
            count+=1
            #ans.append([r,g,(N-r*R-g*G)/B])

#print(ans)
print(count)
import sys
input = sys.stdin.readline
X, Y, A, B, C = (int(i) for i in input().split())
p = [[int(x), "A"] for x in stdin.readline().rstrip().split()]
q = [[int(x), "B"]  for x in stdin.readline().rstrip().split()]
r = [[int(x), "C"] for x in stdin.readline().rstrip().split()]
#A = [[int(i) for i in input().split()] for i in range(N)]
apples = p+q+r

apples.sort(reverse=True)
#print(apples)
ans = 0
pend = 0

while (X > 0 or Y > 0) and X+Y > pend:
    if apples[0][1] == "C":
        pend += 1
        ans += apples[0][0]
        apples.pop(0)
    elif apples[0][1] == "A":
        if X > 0:
            ans += apples[0][0]
            apples.pop(0)
            X -= 1
        else:
            apples.pop(0)
    elif apples[0][1] == "B":
        if Y>0:
            ans += apples[0][0]
            apples.pop(0)
            Y -= 1
        else:
            apples.pop(0)
    #print(ans)
    #print("XY", X, Y, pend)
#print("XY", X, Y, pend)
print(ans)


### FIXED CODE ###

import sys
input = sys.stdin.readline
X, Y, A, B, C = (int(i) for i in input().split())
p = [[int(x), "A"] for x in input().split()]
q = [[int(x), "B"] for x in input().split()]
r = [[int(x), "C"] for x in input().split()]
#A = [[int(i) for i in input().split()] for i in range(N)]
apples = p+q+r


apples.sort(reverse=True)
#print(apples)
ans = 0
pend = 0


for hapi, col in apples:
    if col == "C":
        pend += 1
        ans += hapi
    elif col == "A":
        if X > 0:
            ans += hapi
            X -= 1

    elif col == "B":
        if Y>0:
            ans += hapi
            Y -= 1

    if (X < 1 and Y < 1) or X+Y == pend:
        break
    #print(ans)
    #print("XY", X, Y, pend)
#print("XY", X, Y, pend)
print(ans)
A,B,C = map(int,input().split())
#場合分けが必要なのか？？

#B＋CがAより少ないなら０
if　B+C <= A:
#<=の順番すぐ間違えるやん！！
    print(0)
else:
    print(C-(A-B))

### FIXED CODE ###

A,B,C=map(int,input().split())
if B+C <= A:
    print(0)
else:
    print(C+B-A)
import numpy

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

    print(numpy.lcm(a, b))

if __name__ == "__main__":
    main()

### FIXED CODE ###

def euclidean_algorithm(a, b):
    if a < b:
        tmp = b
        b = a
        a = tmp

    ｑ = a // b
    r = a % b
    while r != 0:
        a = b
        b = r
        q = a // b
        r = a % b

    return b


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

    #ユークリッド互除法(最大公約数)
    gcd = euclidean_algorithm(a, b)

    # 最小公倍数
    lcm = (a*b)//gcd
    print(lcm)

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

from functools import lru_cache


# from decimal import Decimal, ROUND_HALF_UP
# def quantize(f):
#     return int(Decimal(str(f)).quantize(Decimal('0'), rounding=ROUND_HALF_UP))


@lru_cache(maxsize=4096)
def get_cost(x, y):
    if x == y:
        return 0
    else:
        return int(math.pow((x - y), 2))


def get_costs(target, numbers):
    return sum([get_cost(target, n) for n in numbers])


def check(n, numbers):
    n_max = max(numbers)
    n_min = min(numbers)
    costs = []
    for target in range(n_min, n_max + 1):
        costs.append(get_costs(target=target, numbers=numbers))

    return min(costs)


def main():
    N = int(input())
    numbers = map(int, input().split())
    print(check(n=N, numbers=numbers))


if __name__ == '__main__':
    main()


### FIXED CODE ###

import math

from functools import lru_cache


@lru_cache(maxsize=4096)
def get_cost(x, y):
    return int(math.pow((x - y), 2))


def get_costs(target, numbers):
    return sum([get_cost(target, n) for n in numbers])


def check(n, numbers):
    n_max = max(numbers)
    n_min = min(numbers)
    costs = []
    for target in range(n_min, n_max + 1):
        costs.append(get_costs(target=target, numbers=numbers))

    return min(costs)


def main():
    N = int(input())
    numbers = list(map(int, input().split()))
    print(check(n=N, numbers=numbers))


if __name__ == '__main__':
    main()
A,B= map(int,input().split(" "))
count = 0
x = int(A/10**4)
y = int(A/10**3) - x*10
z = 0
N = A 
while N <= B:
    while y < 10:
        while z < 10:
                    N = x*(10**4)+y*(10**3)+z*(10**2)+y(10**1)+x
                    if N >= B:
                        break
                    count = count + 1
                    z = z + 1
        y = y + 1
    x = x + 1
    y = 0
    z = 0
print(count)

### FIXED CODE ###

A,B= map(int,input().split(" "))
count = 0
x = int(A/10**4)
y = int(A/10**3) - x*10
z = int(A/10**2) - x*10**2 - y*10
N = A
while N <= B:
    while y < 10:
        while z < 10:
                    N = x*(10**4)+y*(10**3)+z*(10**2)+y*(10**1)+x
                    if N > B:
                        break
                    if N == B:
                        count = count + 1
                        break
                    if N < A:
                        count = count -1
                    count = count + 1
                    z = z + 1
        z = 0
        y = y + 1
        if N >= B:
            break
    x = x + 1
    y = 0
print(count)
N,M = map(int,input().split())
a = [int(input()) for i in range(M)]
for i in range(M):
  N -= a[i]
print(N if N>0 else -1)

### FIXED CODE ###

N,M = map(int,input().split())
a = list(map(int, input().split()))
for i in range(M):
  N -= a[i]
print(N if N>=0 else '-1')
a, b = int(raw_input()), int(raw_input())
print(a * b, 2*(a+b))

### FIXED CODE ###

a, b = map(int, raw_input().split())
print(str(a*b) + " " + str(2*(a+b)))
#include <iostream>
#include <vector>
using namespace std;

template<class T> void chmin(T &a, T b) {
    if (a > b) a = b;
}

const long long INF = 1LL<<60;

int main() {
    int N; cin >> N;
    vector<int> h(N);
    for (int i = 0; i < N; ++i) cin >> h[i];
    
    vector<long long> dp(N, INF);
    dp[0] = 0;
    
    for (int i = 1; i < N; ++i) {
        chmin(dp[i], dp[i-1] + abs(h[i] - h[i-1]));
        if (i > 1) {
            chmin(dp[i], dp[i-2] + abs(h[i] - h[i-2]));
        }   
    }
    
    cout << dp[N-1] << endl;
}

### FIXED CODE ###

import sys
sys.setrecursionlimit(10**6)

N = int(input())
h = list(map(int, input().split()))
dp = [-1] * (N+1)

def rec(i):
    if i == 0:
        return 0
    if dp[i] != -1:
        return dp[i]
    dp[i] = 2**60 # 十分大きな値
    if i - 1 >= 0:
        dp[i] = min(dp[i], rec(i - 1) + abs(h[i - 1] - h[i]))
    if i - 2 >= 0:
        dp[i] = min(dp[i], rec(i - 2) + abs(h[i - 2] - h[i]))
    return dp[i]

print(rec(N-1))
print(int(input(**2))


### FIXED CODE ###

r = int(input())
print(r**2)
s = raw_input()
valid = 0
left = 15 - len(s)
for tok in s:
    if tok == 'o':
        valid += 1
if valid + left >= 8:
    print('YES')
else:
    print('NO')

### FIXED CODE ###

s = input()
valid = 0
left = 15 - len(s)
for tok in s:
    if tok == 'o':
        valid += 1
if valid + left >= 8:
    print('YES')
else:
    print('NO')
n= int(input())
a = list(map(int,input().split()))
ans = a[0]
ans_max = 10 ** 18

for i in range(1, n):
    ans *= a[i]
    if ans > ans_max:
        print("-1")
        sys.exit()

print(ans)

### FIXED CODE ###

import sys

n= int(input())
a = list(map(int,input().split()))
ans = a[0]
ans_max = 10 ** 18

if 0 in a:
    print(0)
    sys.exit()

for i in range(1, n):
    ans *= a[i]
    if ans > ans_max:
        print("-1")
        sys.exit()

print(ans)
x,y,z=map(int,input().split())
print("{} {} {}".format(z,x,y)

### FIXED CODE ###

x,y,z=map(int,input().split())
print("{} {} {}".format(z,x,y))
n = int(input())
A = list(map(int, input().split()))
count = 0
while True:
    for i in range(n):
        if (A[i] % 2 == 1) or (A[i] == 0):
            break
        A[i] = A[i] // 2
        s += 1
print(s)


### FIXED CODE ###

n = int(input())
A = list(map(int, input().split()))
s = 0

def count(A, n):
    for i in range(n):
        if (A[i] % 2 == 1) or (A[i] == 0):
            return False
        A[i] = A[i] // 2
    return True

while True:
    if count(A, n):
        s += 1
    else:
        break
    
print(s)
def solve(string):
    ins = string.split("\n")
    h, w = map(int, ins[0].split(" "))
    a = [list(map(int, _i.split(" "))) for _i in ins[1:]]
    move = []
    for j in range(h):
        for i in range(w):
            if a[j][i] % 2 == 0:
                pass
    return "{}\n{}".format(len(move), "\n".join(move))


if __name__ == '__main__':
    line = input()
    tmp = [line]
    for _ in range(int(line[0])):
        tmp.append(input())
    print(solve('\n'.join(tmp)))


### FIXED CODE ###

h,w = map(int,input().split())
a = []
for i in range(h):
    tmp = list(map(lambda x:int(x)%2,input().split()))
    a.append(tmp)
result = []
 
for i in range(h):
    for j in range(w-1):
        if a[i][j] == 1:
            #a[i][j] == 0
            a[i][j+1] = 1 ^ a[i][j+1]
            result.append((i+1,j+1,i+1,j+2)) 
for i in range(h-1):
    if a[i][w-1] == 1:
        a[i+1][w-1] = 1 ^ a[i+1][w-1]
        result.append((i+1,w,i+2,w))
print(len(result))
for row in result:
    print("{} {} {} {}".format(row[0],row[1],row[2],row[3]))
a,b,c=map(int,input().split())
print(sort(a,b,c))

### FIXED CODE ###

a,b,c=map(int,input().split())
d=sorted([a,b,c])
print ("{0} {1} {2}".format(d[0],d[1],d[2]))
def resolve():
    X, N = map(int, input().split())
    if N == 0:
        print(X)
        return
    A = set(map(int, input().split()))
    dic = {}
    for i in range(1, 101):
        if i not in A:
            dic[i] = abs(X-i)

    sorted_A = sorted(dic.items(), key=lambda x:x[1])
    print(sorted_A[0][0])

if __name__ == "__main__":
    resolve()


### FIXED CODE ###


def resolve():
    X, N = map(int, input().split())
    if N == 0:
        print(X)
        return
    A = set(map(int, input().split()))
    dic = {}
    for i in range(-10, 110):
        if i not in A:
            dic[i] = abs(X-i)

    sorted_A = sorted(dic.items(), key=lambda x:(x[1], x[0]))
    print(sorted_A[0][0])

if __name__ == "__main__":
    resolve()
s=set;print("YNeos"[s(input())in map(s,"NS","EW","NSEW")::2])

### FIXED CODE ###

S = input()

S = set(S)
if 1 not in [len(S&set(t)) for t in ["NS", "WE"]]:
    print("Yes")
else:
    print("No")
a=0
n = int(input())
b = list(map(int, input().split()))

for i in range(n-2):
  if b[i] > b[i+1]:
    a = a + b[i+1]
  if b[i+1] > b[i]:
    a = a + b[i]
    a = a + b[n-1]
print(a)

### FIXED CODE ###

n = int(input())
b = list(map(int, input().split()))
a_sum = 0

a_sum += b[0]

for i in range(n-2):
    if b[i] >= b[i+1]:
        a_sum += b[i+1]
    if b[i+1] > b[i]:
        a_sum += b[i]

a_sum += b[n-2]
print(a_sum)
n = int(input())
ans = 0
for i in range(1, n+1)
    ans += 1
print(ans)

### FIXED CODE ###

n = int(input())
ans = 0
for i in range(1, n+1):
    ans += i
print(ans)
if int(input())==1:
    print("Hello World")
else:
  	a = int(input())
    b = int(input())
    print(a+b)

### FIXED CODE ###

if int(input())==1:
    print("Hello World")
else:
    a = int(input())
    b = int(input())
    print(a+b)
S = input()
n = len(S)
if n == 1:
    print(1)
else:
    prev = None
    cand = []
    for i in range(n):
        if i != 0:
            if S[i] != prev:
                cand.append(max(i, n-i))
        prev = S[i]    

    print(min(cand))

### FIXED CODE ###

S = input()
n = len(S)

prev = None
cand = []
for i in range(n):
    if i != 0:
        if S[i] != prev:
            cand.append(max(i, n-i))
    prev = S[i]    
if cand:
    print(min(cand))
else:
    print(n)
from itertools import combinations
import collections

N = int(input()) 

A = []
for i in range(N):
    A.append(input()[0])

AA = set(A)
C = collections.Counter(A)
print(sum(C[a]*C[b]*C[c] for a, b, c combinations(AA, 3)))

### FIXED CODE ###

from itertools import combinations
import collections

N = int(input()) 

A = []
for i in range(N):
    A.append(input()[0])

C = collections.Counter(A)
print(sum(C[a]*C[b]*C[c] for a, b, c in combinations("MARCH", 3)))
n,m=map(int,input().split())
L=list(map(int,input().split()))
L.sort()
if m!=1:

  d=[[L[i+1]-L[i],i] for i in range(m-1)]
  d.sort()
  d.reverse()
  ans=L[m-1]-L[0]

  for i in range(n-1):
    a=d[i][1]
    print(a)
    d[a]=0
    ans-=(L[a+1]-L[a])
  print(ans)
  

else:
  print(0)





### FIXED CODE ###

n,m=map(int,input().split())
L=list(map(int,input().split()))
L.sort()
if n>=m:
  print(0)
elif m!=1:

  d=[L[i+1]-L[i] for i in range(m-1)]
  d.sort()
  d.reverse()
  ans=L[-1]-L[0]


  ans-=sum(d[:n-1])
  print(ans)
  

else:
  print(0)
# C
import functools
import math

n = int(input())
a = list(map(int, input().split()))
ans = 0

for i in range(n):
    values = a[:i] + a[i+1:]
    gcd = functools.reduce(math.gcd, values)
    ans = max(ans, gcd)
print(ans)

### FIXED CODE ###

# C
import functools
# 3.4以前は math の gcd が対応していないので fractions のものを使う
# from fractions import gcd
def gcd(a,b):
    if a<b:a,b=b,a
    if a%b==0:return b
    return gcd(b,a%b)


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

gcd_left = [a[0]]
gcd_right = [a[-1]]
for i in range(1,n):
    if gcd_left[i-1] != 1:
        res = gcd(gcd_left[i-1], a[i])
    else:
        res = 1
    gcd_left.append(res)

for i in range(1,n):
    if gcd_right[i-1] != 1:
        res = gcd(gcd_right[i-1], a[-(i+1)])
    else:
        res = 1
    gcd_right.append(res)
gcd_right = gcd_right[::-1]


ans = 0
for i in range(n):
    if i == 0:
        res = gcd_right[1]
    elif i == n-1:
        res = gcd_left[-2]
    else:
        res = gcd(gcd_right[i+1], gcd_left[i-1])
    ans = max(res, ans)
print(ans)
a,b=[int(i) in i for input().split()]
abab=abs(abs(a) - abs(b))
saab=abs(b-a)
if b < a and b * a >0:
  print(saab + 2)
elif b > a and b * a >0:
  print(saab)
elif b < a and b * a <0:
  print(saab + 1)
elif b > a and b * a >0:
  print(max(saab,abab+1))

### FIXED CODE ###

a,b=[int(i) for i in input().split()]
abab=abs(abs(a) - abs(b))
saab=abs(b-a)
if b < a and b * a >0:
  print(saab + 2)
elif b > a and b * a >=0:
  print(saab)
elif b < a and b * a <=0:
  print(min(saab + 1,abab+1))
elif b > a and b * a <0:
  print(min(saab,abab+1))