Harryxun/stf_run huggingface dataset:
n,x = map(int, input().split())
city = []
sub = []
city = list(map(int, input().split()))

for i in range(len(city)):
	sub.append(abs(x - city[i]))

def gcd(a,b):
	if b == 0:
		return a
	return gcd(b, a%b)

p = gcd(sub[0], sub[1])
for i in range(2,len(sub)):
	ans = gcd(p,sub[i])

print(ans)

### FIXED CODE ###

n,x = map(int, input().split())
city = []
sub = []
city = list(map(int, input().split()))

for i in range(len(city)):
	sub.append(abs(x - city[i]))

def gcd(a,b):
	if b == 0:
		return a
	return gcd(b, a%b)


if len(sub) == 1:
	print(sub[0])
elif len(sub) == 2:
	print(gcd(sub[0],sub[1]))
else:
	p = gcd(sub[0], sub[1])
	for i in range(2,len(sub)):
		p = gcd(p,sub[i])
	print(p)
n = int(input())
a = list(map(int, input().split()))
l = len(a)
b = [int(-a[0]/ abs(a[0]))]
for i in range(1, l):
  b.append(a[i])
ans = 0
summary = a[0]

if(summary == 0):
  if(a[1] > 0):
    summary = -1
    ans+= 1
  else:
    summary = 1
    ans+= 1

for i in range(1, l):
  if(summary* (summary+ a[i])>= 0):
    if(summary > 0):
      ans+= a[i]+ summary+ 1
      a[i] = -summary- 1 
      summary= -1
    else:
      ans+= -summary+ 1- a[i]
      a[i] = -summary+ 1
      summary= 1
  else:
    summary+= a[i]

Ans = 0
Summary = b[0]

if(Summary == 0):
  if(b[1] > 0):
    Summary = -1
    Ans+= 1
  else:
    Summary = 1
    Ans+= 1

for i in range(1, l):
  if(Summary* (Summary+ b[i])>= 0):
    if(Summary > 0):
      Ans+= b[i]+ Summary+ 1
      b[i] = -Summary- 1 
      Summary= -1
    else:
      Ans+= -Summary+ 1- b[i]
      b[i] = -Summary+ 1
      Summary= 1
  else:
    Summary+= b[i]
    
print(min(ans, Ans))

### FIXED CODE ###

n = int(input())
a = list(map(int, input().split()))
l = len(a)
b = []
for i in range(l):
  b.append(a[i])
  
ans = 0
Ans = 0
summary = a[0]

if(summary == 0):
  summary = 1
  ans+= 1
  Summary = -1
  Ans+= 1
else:
  b[0] = int(-a[0]/ abs(a[0]))
  Ans+= abs(a[0]- b[0])
  Summary = b[0]  
  
for i in range(1, l):
  if(summary* (summary+ a[i])>= 0):
    if(summary > 0):
      ans+= a[i]+ summary+ 1
      a[i] = -summary- 1 
      summary= -1
    else:
      ans+= -summary+ 1- a[i]
      a[i] = -summary+ 1
      summary= 1
  else:
    summary+= a[i]

for i in range(1, l):
  if(Summary* (Summary+ b[i])>= 0):
    if(Summary > 0):
      Ans+= b[i]+ Summary+ 1
      b[i] = -Summary- 1 
      Summary= -1
    else:
      Ans+= -Summary+ 1- b[i]
      b[i] = -Summary+ 1
      Summary= 1
  else:
    Summary+= b[i]
    
print(min(ans, Ans))
N = int(input())
if N%1000==0:
print(0)
else
print(N%1000)


### FIXED CODE ###

N = int(input())
if N%1000==0:
    print(0)
else:
    print(1000-N%1000)
s = int(input())

m = s // 60
h = m // 60
s = s % 60

output=""
if(h!=0):
   output+=int(h)
output+=":"
if(m!=0):
   output+=int(m)
output+=":"
if(s!=0):
   output+=int(s)

print(output)



### FIXED CODE ###

s = int(input())

m = s // 60
h = m // 60
m = m % 60
s = s % 60

output=""
output+=str(h)
output+=":"
output+=str(m)
output+=":"
output+=str(s)

print(output)
print(x*x*x)

### FIXED CODE ###

x=int(input())
print(x**3)
l, r = map(int, input().split())
 
i_rest = l % 2019
for i in range(l, r):
  i_rest_next = i % 2019
  if i_rest_next <= i_rest:
    i_rest = i_rest_next
    count_i = i
min_i = i_rest

i_rest = (count_i+1) % 2019
for i in range(count_i+1, r+1):
  i_rest_next = i % 2019
  if i_rest_next <= i_rest:
    i_rest = i_rest_next
min_j = i_rest
 
print(min_i * min_j)

### FIXED CODE ###

num = [int(i) for i in input().split()]
print(min(num[0]*num[1], num[2]))
a = [int(map(int, input.split())) for i in range(n)]
a1 = a[0]
a2 = a[1]
ans = 1
for r in range(a[0]):
  ans *= a2[r]
print(ans)

### FIXED CODE ###

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

ans = 1
if 0 in A:
  print(0)
  exit()
  
for r in A:
  ans *= r
  if ans > 1e18:
      print(-1)
      exit()
      
print(ans)
import math
n,d=map(int(input().split()))
c=0
for i in range(n):
  a,b=map(int(input().split()))
  r=math.sqrt(a**2+b**2)
  if r<=d:
    c+=1
print(c)    

### FIXED CODE ###

import math
n,d=map(int,input().split())
c=0
for i in range(n):
  a,b=map(int,input().split())
  r=math.sqrt(a**2+b**2)
  if r<=d:
    c+=1
print(c)
a = int(input())
b = int(input())

if a > b:
  print("GREATER")
else if:
  print("LESS")
else:
  print("EQUAL")

### FIXED CODE ###

a = int(input())
b = int(input())
 
if a > b:
  print("GREATER")
elif a < b:
  print("LESS")
else:
  print("EQUAL")
n = int(input())
V = list(map(int, input().split()))
V.sort()
V.reverse()

if len(V) == 2:
  print(V[0]+V[1])/2
else:
  ans = 0
  for i in range(n-1):
    ans += V[i]/(2**(i+1))
  ans += V[n-1]/(2**(n-1))
  print(ans)

### FIXED CODE ###

n = int(input())
V = list(map(int, input().split()))
V.sort()
V.reverse()

if len(V) == 2:
  print((V[0]+V[1])/2)
else:
  ans = 0
  for i in range(n-1):
    ans += V[i]/(2**(i+1))
  ans += V[n-1]/(2**(n-1))
  print(ans)
S,W = map(int, input().split())
if S > W:
  print(safe)
else :
  print(unsafe)


### FIXED CODE ###

S,W = map(int, input().split())
if S > W:
  print('safe')
else :
  print('unsafe')
#!/usr/bin/env python

from fractions import gcd

def solve():
    N, M = map(int, input().split())
    S = list(input())
    T = list(input())

    k = N * M // gcd(N, M)

    S_new = ''.join([c + ' '*(k//N-1) for c in S])
    T_new = ''.join([c + ' '*(k//M-1) for c in T])

    for i, j in zip(S_new, T_new):
        if i !=' ' and j != ' ' and i != j:
            print(-1)
            break
    else:
        print(k)

solve()

### FIXED CODE ###

#!/usr/bin/env python

from fractions import gcd

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

g = int(gcd(N, M))
l = N * M // g

for i, j in zip(S[::N//g], T[::M//g]):
    if i != j:
        print(-1)
        break
else:
    print(l)
N = int(input())
a = list(map(int, input().split()))
    
A = 0
B = sum(a)

min = B

for i in range(N-1):
     A += a[i]
     B -= a[i]
     
   if min > abs(A - B):
        min = abs(A - B)
    

print(ans)

### FIXED CODE ###

N = int(input())
a = list(map(int, input().split()))
    
A = a[0]
B = sum(a[1:])

min = abs(A - B)

for i in range(N-2):
    A += a[i+1]
    B -= a[i+1]

    if min > abs(A - B):
        min = abs(A - B)


print(min)
[a,b] = int(input().split())
 if a < b:
   print(' a < b ')
 elif a > b:
   print(' b < a ')
 else:
   print(' a == b ')

 

### FIXED CODE ###

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

if a < b:
    print("a < b")
elif a > b:
    print("a > b")
else:
    print("a == b")
N=int(input())
H=list(map(int,input().split()))
i = 0
ans =[]
cnt = 0
for i in range( N-1 ):
  if H[i] >= H[i+1]:
    cnt += 1
  else:
    ans.append(cnt)
    cnt = 0
  ans.append(cnt)
print(max(ans))
       

### FIXED CODE ###

N=int(input())
H=list(map(int,input().split()))
ans =[]
cnt = 0
if N == 1:
  print (0)
  exit()
for i in range( N-1 ):
  if H[i] >= H[i+1]:
    cnt += 1
  else:
    ans.append(cnt)
    cnt = 0
  ans.append(cnt)
print(max(ans))
S=input()
l=len(S)
S1=S[1:(l+1)/2]
S2=S[(l+3)/2::]
if S==S[::] and S1==S1[::-1] and S2==S2[::-1]:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

S=input()
l=len(S)
S1=S[:int((l-1)/2)]
S2=S[int((l+1)/2)::]
if S==S[::-1] and S1==S1[::-1] and S2==S2[::-1]:
  print("Yes")
else:
  print("No")
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**9)
n,m=map(int,input().split())

a=[int(input()) for i in range(m)]

def fib(n):
    if n==0:
        return 1
    if n==1:
        return 1
    if n==2:
        return 2
    return fib(n-1)+fib(n-2)

ans=1
check=0
for i in a:
    if i-check==1 and i!=1:
        print(0)
        exit()
    if i-check==1 and i==1:
        check=1
    else:
      ans*= fib(i-check-2)
      check=i
ans*=fib(n-a[-1]-1)
print(ans%((10**9)+7))


### FIXED CODE ###

n,m=map(int,input().split())
mod=10**9+7

    
dp=[0]*(n+1)
dp[0]=1

a=set(int(input()) for i in range(m))

for i in range(1,n+1):
    if i in a:
        continue
    x=dp[i-1]
    if i>1:
        x+=dp[i-2]
    dp[i]=x%mod
print(dp[-1])
8 20

### FIXED CODE ###

a, b = map(int, input().split())
if b%a == 0:
  print(a+b)
else:
  print(b-a)
a, md = [], []
c, mx = 1, 1
while True:
    try:
        a.append(int(input()))
    except EOFError:
        break
a = sorted(a)
print(a)
for i in range(0, len(a) - 1):
    if a[i] == a[i + 1]:
        c += 1
    else:
        c = 1
    if mx < c:
        mx = c
        md = [a[i]]
    elif mx == c:
        md.append(a[i])
print('\n'.join(map(str, sorted(md)))

### FIXED CODE ###

a = []
ary = [0] * 101
while True:
    try:
        c = int(input())
    except EOFError:
        break
    a.append(c)
    ary[c] += 1
for i in range(1, 101):
    if ary[i] == max(ary):
        print(i)
n=int(intpu())
flag=0
for i in range(n):
  a=list(map(int,input().split()))
  if a[0]==a[1]:
    flag+=1
  else:
    flag=0
  if flag==3:
    break
if flag==3:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

n=int(input())
flag=0
for i in range(n):
  a=list(map(int,input().split()))
  if a[0]==a[1]:
    flag+=1
  else:
    flag=0
  if flag==3:
    break
if flag==3:
  print("Yes")
else:
  print("No")
a,b,c = input().split()
d,e,f = input().split()
g,h,i = input().split()

print(a+e+i)

### FIXED CODE ###

s = [input() for i in range(3)]

print(s[0][0]+s[1][1]+s[2][2])
N,K=map(int,input().split())
A=list(map(int,input().split()))
L=[]
A.sort()
A.append(200001)
for i in range(N):
  if A[i]==A[i+1]:
    continue
  else:
    x=A.count(A[i])
    L.append(x)
L.sort(reverse=True)
S=0
for i in range(K):
  S+=L[i]
print(N-S)

### FIXED CODE ###

from collections import Counter
N,K=map(int,input().split())
A=list(map(int,input().split()))
x=Counter(A)
l=x.most_common(K)
s=0
for i in range(len(l)):
  s+=l[i][1]
  
print(N-s)
pie=int("3*A+P")
if pie//2:
 (3*A+P)/2
else :
 (3*A+P-1)/2

### FIXED CODE ###

a, p = map(int, input().split())
print((a*3+p) // 2)
import sqrt from math
N=int(input())
for i in range(int(sqrt(N))+1,-1,-1):
    if N%i==0:
        print(i-1+N//i-1)
        exit()


### FIXED CODE ###

from math import sqrt
N=int(input())
for i in range(int(sqrt(N))+1,-1,-1):
    if N%i==0:
        print(i-1+N//i-1)
        exit()
a,b,c=map(int,input().split())

if a < c < b:
    print('Yes')
else:
    print('No)

### FIXED CODE ###



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

if a <=c <=b:
    print('Yes')
elif a >= c >= b:
    print('Yes')
else:
    print('No')
X, Y, Z = int(input().split())

print((x-1)//(Y+Z))

### FIXED CODE ###

X,Y,Z = map(int, input().split())


print((X-Z)//(Z+Y))
a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())
if v = w and a != b:
    print('NO')
else:
    if 0 <= ((b - a) / (v - w)) <= t:
        print('YES')
    else:
        print('NO')

### FIXED CODE ###

a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())
if v <= w:
    print('NO')
else:
    if 1 <= (abs(b - a) / (v - w)) <= t:
        print('YES')
    else:
        print('NO')
def merge(A,B):
    C = []
    
    while len(A)!=0 and len(B) != 0:
        if A[0]>B[0]:
            C.append(A[0])
            del A[0]
        else:
            C.append(B[0])
            del B[0]

    if len(A)>len(B):
        C.extend(A)
    else:
        C.extend(B)

    return C

if __name__ == "__main__":
    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 = [1,23,4,1,2]
    # Q = [4,3,56]
    # R = [70,20,1]

    P.sort(reverse=True)
    Q.sort(reverse=True)
    R.sort(reverse=True)

    S = merge(P[:X],Q[:Y])
    S = merge(S,R)
    
    score = 0
    for i in range(X+Y):
        score += S[i]
    print(score)



### FIXED CODE ###

S = input()

if S[2] == S[3] and S[4] == S[5]:
    print('Yes')
else:
    print('No')
N,M = map(int,input().split())
A = list(map(int,input().split()))

for i in range(M):
    if A[0]<A[1]:
        A = sorted(A,reverse=True)
    A[0] = A[0]//2
print(sum(A))

### FIXED CODE ###

N,M = map(int,input().split())
A = list(map(int,input().split()))
A = list(map(lambda x: x*(-1),A))
import heapq
heapq.heapify(A)

for i in range(M):
    maxA = (((heapq.heappop(A))*(-1))//2)*(-1)
    heapq.heappush(A,maxA)
   
    
print(sum(A)*-1)
import sys
import itertools
import numpy as np

from collections import defaultdict

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
 
n = int(readline())
A = list(map(lambda x: x.split(), read().decode().split('\n')))

l = defaultdict(list)
visited = {}
passed = {}

# make topological tree
key = ''
for i in range(n):

    if i + 1 < int(A[i][0]):
        key = f'{i + 1}-{A[i][0]}'
    else:
        key = f'{A[i][0]}-{i + 1}'
    
    visited[key] = False 
    passed[key] = False 
    prev_key = key

    for j in range(1, n - 1):
        if i + 1 < int(A[i][j]):
            key = f'{i + 1}-{A[i][j]}'
        else:
            key = f'{A[i][j]}-{i + 1}'

        l[prev_key].append(key)
        prev_key = key
        # init visited
        visited[key] = False 
        passed[key] = False 


topo = []
def dfs(start):
    passed[start] = True
    if not l[start]:
        visited[start] = True
        topo.append(start)
        return
    
    for node in l[start]:
        if visited[node]:
            continue
        
        if passed[node]:
            print(-1)
            exit()
        dfs(node)

    visited[start] = True
    topo.append(start)

for key in list(l):
    if visited[key]:
        continue
    dfs(key)

res = 0
check = [False for i in range(n + 1)]
for node in topo:
    a, b = map(int, node.split('-'))
    if check[a] or check[b]:
        check = [False for i in range(n + 1)]
        res += 1

    check[a] = True
    check[b] = True

if any(check):
    res += 1
print(res)

### FIXED CODE ###

import sys
import itertools
import numpy as np

from collections import defaultdict

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
 
N = int(readline())
A = [[-1] + [int(x) - 1 for x in row.split()][::-1] for row in readlines()]

# A.append([-1])

def f(cand):
    cand1 = set()
    can_use = []
    for n in cand:
        if A[A[n][-1]][-1] == n:
            can_use.append(n)
    for n in can_use:
        A[n].pop()
        cand1.add(n)
        if A[n][-1] != -1:
            cand1.add(A[n][-1])
    return len(can_use), cand1

answer = 0
rest = N*(N-1)
cand = set(range(N))
while True:
    answer += 1
    x, cand = f(cand)
    if x == 0:
        answer = -1
        break
    rest -= x
    if rest == 0:
        break

print(answer)
import collections
import operator

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

D_dict = collections.Counter(D)
D_dict_sorted = sorted(D_dict.items(), key=operator.itemgetter(0))

if not D[0] != 0:
    ans = 1
    for i in range(int(max(D))):
        ans *= D_dict_sorted[i][1] ** D_dict_sorted[i+1][1]
        if ans >= 998244353:
            ans = ans % 998244353
else:
    ans = 0

print(ans)

### FIXED CODE ###

import collections
import operator

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

D_dict = collections.Counter(D)
D_dict_sorted = sorted(D_dict.items(), key=operator.itemgetter(0))

# l = []
# for i in range(int(max(D))):
#     if D_dict_sorted[i][0] + 1 == D_dict_sorted[i+1][0]
#     l.append()

if (D[0] == 0) and (D_dict_sorted[0][1] == 1) :
    ans = 1
    for i in range(len(D_dict_sorted)-1):
        if D_dict_sorted[i][0] + 1 == D_dict_sorted[i+1][0]:
            ans *= D_dict_sorted[i][1] ** D_dict_sorted[i+1][1]
            if ans >= 998244353:
                ans = ans % 998244353
        else:
            ans = 0
else:
    ans = 0

print(ans)
n = int(input())
lis = list(map(int,input().split()))
le = 0
ri = sum(lis)
ans = sum(lis)
cou = 0
for i in range(1,101):
  while lis[cou] == i:
    le += lis[cou]
    ri -= lis[cou]
    cou += 1
  ans = min(ans,abs(le-ri))
print(ans)


### FIXED CODE ###

n = int(input())
lis = list(map(int,input().split()))
ans = 10 ** 9
le = 0
ri = sum(lis)
ans = sum(lis)
for num in lis:
  le += num
  ri -= num
  ans = min(ans,abs(ri-le))
print(ans)
def lpop(ans,l):
    return((ans * l.pop(0)) % (10 ** 9 + 7))
N,K = map(int,input().split())
lp = []
lm = []
for a in map(int,input().split()):
    if a >= 0:
        lp.append(a)
    else:
        lm.append(a)
lp.sort
lm = sorted(lm,reverse=(len(lm) - K) % 2 == 1 and len(lp) == 0)
ans = 1
np = len(lp) == 0
nm = len(lm) == 0
fp = len(lp) == 1
fm = len(lm) == 1
f = len(lp) + len(lm) == 1
skp = 0

for k in range(K):
    if skp:
        skp = 0
        continue
    if np:
        ans = lpop(ans,lm)
        continue
    if nm:
        ans = lpop(ans,lp)
        continue
    if fm:
        ans = lpop(ans,lp)
        if len(lp) == 0:
            np = 1
        continue
    if fp:
        if f:
            ans = lpop(ans,lp)
            continue
        ans = lpop(ans,lm)
        ans = lpop(ans,lm)
        if len(lm) == 0:
            nm = 1
        continue
    p0 = lp[0]
    p1 = lp[1]
    m0 = -1 * lm[0]
    m1 = -1 * lm[1]
    if p0 * p1 > m0 * m1:
        ans = lpop(ans,lp)
        ans = lpop(ans,lp)
    else:
        ans = lpop(ans,lm)
        ans = lpop(ans,lm)
    skp = 1
    np = len(lp) == 0
    nm = len(lm) == 0
    fp = len(lp) == 1
    fm = len(lm) == 1
print(ans)


### FIXED CODE ###

N,K = map(int,input().split())
la = list(map(int,input().split()))
la = sorted(la)
la = sorted(la,key=abs,reverse=True)
lg = la[:K]
lgp = []
lgm = []
lr = la[K:]
lrp = []
lrm = []
for a in lg:
    if a >= 0:
        lgp.append(a)
    else:
        lgm.append(a)
for a in lr:
    if a >= 0:
        lrp.append(a)
    else:
        lrm.append(a)
if len(lgm) % 2 == 1:
    if len(lrp) > 0 and len(lrm) > 0:
        if len(lgp) > 0 and len(lgm) > 0:
            if lgp[len(lgp) - 1] * lrp[0] > lgm[len(lgm) - 1] * lrm[0]:
                lg.pop(lg.index(lgm[len(lgm) - 1]))
                lg.append(lrp[0])
            else:
                lg.pop(lg.index(lgp[len(lgp) - 1]))
                lg.append(lrm[0])
        else:
            if len(lgp) > 0:
                lg.pop(lg.index(lgp[len(lgp) - 1]))
                lg.append(lrm[0])
            else:
                lg.pop(lg.index(lgm[len(lgm) - 1]))
                lg.append(lrp[0])
    elif len(lrp) > 0:
        if len(lgm) > 0:
            lg.pop(lg.index(lgm[len(lgm) - 1]))
            lg.append(lrp[0])
        else:
            lg = la[N - K:]
    elif len(lrm) > 0:
        if len(lgp) > 0:
            lg.pop(lg.index(lgp[len(lgp) - 1]))
            lg.append(lrm[0])
        else:
            lg = la[N - K:]
ans = 1
for a in lg:
    ans *= a
    ans %= 10 ** 9 + 7
print(ans)
N,K =map(int, input().split())
A=list(map(int, input().split()))
cnt = 0
for i in A :
    if i >= k:
        cnt +=1
print(cnt)

### FIXED CODE ###

N,K =map(int, input().split())
A=list(map(int, input().split()))
cnt = 0
for i in A :
    if i >= K:
        cnt +=1
print(cnt)
X,Y=map(int,input().split())

a = 2*X -Y/2
b = Y/2 - X

if ((a+b) == X) and ((2*a+4*b) == Y):
    print('Yes')
else:
    print('No')	

### FIXED CODE ###

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

if A == 0:
    print(1)
elif B == 0:
    print(2)
elif C == 0:
    print(3)
elif D == 0:
    print(4)
else:
    print(5)
n, m = map(int,input().split())
a = [input() for _ in range(n)]
b = [input() for _ in range(m)]
flag = 0
for i in range(n-m+1):
    for j in range(n-m+1):
        if a[i][j:j+m] == b[0] and a[i+1][j:j+m] == b[1]:
            flag = 1
print("Yes" if flag == 1 else "No")

### FIXED CODE ###

n, m = map(int,input().split())
a = [input() for _ in range(n)]
b = [input() for _ in range(m)]
r = any([r[j:j+m] for r in a[i:i+m]]==b for i in range(n-m+1) for j in range(n-m+1))
print("Yes" if r else "No")
import numpy as np
from scipy.sparse.csgraph import shortest_path
from scipy.sparse import csr_matrix

n, m = map(int, input().split())
l = [[0 for _ in range(m)] for _ in range(m)]
for _ in range(m):
  a, b = map(int, input().split())
  l[a-1][b-1] = 1
  l[b-1][a-1] = 1

csr = csr_matrix(l)
d, p = shortest_path(csr, indices=0, directed=False, unweighted=True, return_predecessors=True)
p += 1

print('Yes')
for i in p:
  if i < 0: continue
  print(i)

### FIXED CODE ###

import sys
import math
import numpy as np
from collections import deque

def I():
  return int(input())
def IS():
  return map(int, input().split())
def IL():
  return [int(x) for x in input().split()]
def ILL(n):
  return [list(map(int, input().split())) for _ in range(n)]
def S():
  return input()
def SS():
  return input().split()

def main():
  N, M = IS()
  to = [[] for _ in range(N)]
  INF = float('inf')
  for i in range(M):
    A, B = IS()
    A -= 1
    B -= 1
    to[A].append(B)
    to[B].append(A) 
  # queue
  q = deque()
  q.append(0)
  # diatance to first room
  dist = [INF] * N
  # previous room
  prev = [-1] * N
 
  #### BFS ####
  while len(q) != 0:
    # pop from queue
    v = q.popleft()
    # seatch room of v's neighboor
    for u in to[v]:
      if prev[u] == -1:
        dist[u] = dist[v] + 1
        prev[u] = v
        q.append(u)
  # print answer
  print("Yes")
  for i in range(1, len(prev)):
    print(prev[i] + 1)

if __name__ == "__main__":
    main()
from collections import defaultdict
from itertools import combinations

N, M = map(int, input().split())
A = []
B = []
for _ in range(M):
    a, b = map(int, input().split())
    A.append(a)
    B.append(b)

group_list = []

#D = defaultdict(set)
for a, b in zip(A, B):
    if len(group_list) == 0:
        group_list.append(set([a, b]))
    else:
        flag = True
        for g in group_list:
            if a in g:
                g.add(b)
                flag = False
                break
            if b in g:
                g.add(a)
                flag = False
                break
        if flag:
            group_list.append(set([a, b]))

print(max([len(g) for g in group_list]))

### FIXED CODE ###

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

if M == 0:
    print(1)
    exit()

group_list = []
group_index = [0] * N

for _ in range(M):
    a, b = map(int, input().split())
    if group_index[a-1] == 0 and group_index[b-1] == 0:
        group_index[a-1] = len(group_list) + 1
        group_index[b-1] = len(group_list) + 1
        group_list.append(set([a, b]))

    elif group_index[a-1] == 0:
        group_index[a-1] = group_index[b-1]
        group_list[group_index[b-1] - 1].add(a)

    elif group_index[b-1] == 0:
        group_index[b-1] = group_index[a-1]
        group_list[group_index[a-1] - 1].add(b)

    elif group_index[a-1] != group_index[b-1]:
        if len(group_list[group_index[a-1] - 1]) > len(group_list[group_index[b-1] - 1]):
            group_id_b = group_index[b-1] - 1
            for p in group_list[group_id_b]:
                group_index[p-1] = group_index[a-1]
                group_list[group_index[a-1] - 1].add(p)
            group_list[group_id_b] = set()
        else:
            group_id_a = group_index[a-1] - 1
            for p in group_list[group_id_a]:
                group_index[p-1] = group_index[b-1]
                group_list[group_index[b-1] - 1].add(p)
            group_list[group_id_a] = set()

print(max([len(g) for g in group_list]))
print x =^ 3

### FIXED CODE ###

x = input()
print x*x*x