Harryxun/stf_run huggingface dataset:
n=int(input())
if(n>81):
    print("No")
else:
    c2=0
    c3=0
    c5=0
    c7=0
    while(n%2==0):
        c2+=1
        n=n/2
    while(n%3==0):
        c3+=1
        n=n/3
    while(n%5==0):
        c5+=1
        n=n/5
    while(n%7==0):
        c7+=1
        n=n/7
    if(n!=1):
        print("No")
    else:
        if(c5==2 and c2==0 and c3==0 and c7==0):
            print("Yes")
        elif(c5<2):
            print("Yes")
        else:
            print("No")

### FIXED CODE ###

a,b=map(int,input().split())
if(a<10 and b<10):
  print(a*b)
else:
  print(-1)
n,d = map(int,input().split())
x = [list(map(int,input().split())) for a in range(n)]
c = 0
 
for i in range(n-1):
  for j in range(i+1,n+1):
    b = 0
    for m in range(d):
      b += (int(x[i][m])-int(x[j][m]))**2
    if (b**0.5)　== float(int(b**0.5)):
      c += 1
      
print(c)

### FIXED CODE ###

n,d = map(int,input().split())
w = [list(map(int,input().split())) for a in range(n)]
c = 0
 
for i in range(n-1):
  for j in range(i+1,n):
    b = 0
    for m in range(d):
      b += (w[i][m]-w[j][m])**2
    if (b**0.5)==float(int(b**0.5)):
      c += 1
      
print(c)
A, B, C = map(int, input().split())
K = int(input())
result = sum(A, B, C)
t = max(A, B, C)
result += (t << K) - t
print(result)


### FIXED CODE ###

A, B, C = map(int, input().split())
K = int(input())
result = sum([A, B, C])
t = max(A, B, C)
result += (t << K) - t
print(result)
N, X = map(int, input().split())
L = list(map(int, input().split()))
D = [0]
i = 1
cnt = 0
while X - max(D) >= 0:
  D.append(D[i-1]+ L[i-1])
  i += 1
  cnt += 1
  if i == N+2:
    break
if cnt == 0:
  print(cnt+1)
else:
  print(cnt)

### FIXED CODE ###

N, X = map(int, input().split())
L = list(map(int, input().split()))
D = [0]
cnt = 1
for i in range(1,N+1):
  D.append(D[i-1]+L[i-1])
  if X >= D[i]:
    cnt += 1
print(cnt)
a = int(input())

ans = a+a*a+a*a*a

return ans


### FIXED CODE ###

a = int(input())

ans = a+a*a+a*a*a

print(ans)
# coding: utf-8
import sys
from functools import lru_cache
import numpy as np

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

N, K = lr()
A = np.array(lr())
limit = max(A.max(), K).bit_length()
bit_cnt = [((A>>k)&1).sum() for k in range(limit)]

@lru_cache(None)
def solve(K, index):
    if index < 0:
        return 0
    bit = 1 << index
    # bitを使わない（整数Xのこの桁のbitは0）
    ret = (bit_cnt[index]<<index) + solve(min(K, bit-1), index-1)
    if bit <= K:
        ret = max(ret, ((N-bit_cnt[index])<<index) +  solve(K-bit, index-1))
    return ret

answer = solve(K, limit-1)
print(answer)



### FIXED CODE ###

import numpy as np

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

max_len = max(len(bin(K)[2:]), len(bin(max(A))[2:]))
bit_cnt = [((A>>k)&1).sum() for k in range(max_len)]

x = 0
for i in range(max_len-1, -1, -1):
    if x+2**i <= K and bit_cnt[i] < (N+1)//2:
        x += 2**i

answer = 0
for a in A:
    answer += a^x
print(answer)
s = input().split()
a = int(s[0])
b = int(s[1])
c = (a*b)/2
if c =! int(c):
  print(Odd)
else:
  print(Even)

### FIXED CODE ###

s = input().split()
a = int(s[0])
b = int(s[1])
if (a*b)%2 == 0:
  print('Even')
else:
  print('Odd')
import sys

sys.setrecursionlimit(10 ** 7)
f_inf = float('inf')
mod = 10 ** 9 + 7


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


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


def resolve():
    n, m = map(int, input().split())
    s = input()
    t = input()

    L = lcm(n, m)
    X = [""] * L
    for i in range(n):
        idx = i * L // n
        X[idx] = s[i]

    for i in range(m):
        idx = i * L // m
        if X[idx] != "" and X[idx] != t[i]:
            print("-1")
            break
    else:
        print(L)


if __name__ == '__main__':
    resolve()


### FIXED CODE ###

import sys
from collections import defaultdict

sys.setrecursionlimit(10 ** 7)
f_inf = float('inf')
mod = 10 ** 9 + 7


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


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


def resolve():
    n, m = map(int, input().split())
    s = input()
    t = input()

    L = lcm(n, m)

    X = dict()
    for i in range(n):
        idx = (L // n) * i
        X[idx] = s[i]

    for i in range(m):
        idx = (L // m) * i
        if X.get(idx) != None and X[idx] != t[i]:
            print("-1")
            break
    else:
        print(L)


if __name__ == '__main__':
    resolve()
N=int(input().strip())
a=[0]*(N-1) # # of lines
b=[0]*(N-1)
#to=[[] for j in range(N-1)] # points
ans=[0]*(N-1)

class data:
    def __init__(self):
        self.to=[[] for j in range(N)] # N points
        self.id=[[] for j in range(N)] # N points

def dfs(v,p,c_p): # vertices & parent idx & color from parent
    lst=data.to[v] # children list
    c=1
    for i,child in enumerate(lst):
        if child==p:
            continue
        if c_p==c:
            c+=1
        ans[data.id[v][i]]=c
        c+=1
        dfs(child,v,c-1)

data=data()
for i in range(len(a)):
    a,b=list(map(int,input().strip().split()))
    a-=1
    b-=1
    data.to[a].append(b)
    data.id[a].append(i) # index of the line
    data.to[b].append(a)
    data.id[b].append(i)

#print(data.to)

dfs(0,-1,-1)
print(max(ans))
for i in range(len(ans)):
    print(ans[i])

### FIXED CODE ###

import sys #追加
sys.setrecursionlimit(500*500) #追加

N=int(input().strip())
a=[0]*(N-1) # # of lines
b=[0]*(N-1)
#to=[[] for j in range(N-1)] # points
ans=[0]*(N-1)

class data:
    def __init__(self):
        self.to=[[] for j in range(N)] # N points
        self.id=[[] for j in range(N)] # N points

def dfs(v,p,c_p): # vertices & parent idx & color from parent
    lst=data.to[v] # children list
    c=1
    for i,child in enumerate(lst):
        if child==p:
            continue
        if c_p==c:
            c+=1
        ans[data.id[v][i]]=c
        c+=1
        dfs(child,v,c-1)

data=data()
for i in range(len(a)):
    a,b=list(map(int,input().strip().split()))
    a-=1
    b-=1
    data.to[a].append(b)
    data.id[a].append(i) # index of the line
    data.to[b].append(a)
    data.id[b].append(i)

#print(data.to)

dfs(0,-1,-1)
print(max(ans))
for i in range(len(ans)):
    print(ans[i])
N = int(input())
A = list(map(int, input().split()))
X = [0 for i in range(8)]
cnt = 0
for a in A:
  if a == 3200:
    cnt += 1
  else:
    X[a // 400] = 1
s = sum(X)
if s == 0:
  print(str(1) + " " + str(min(8, cnt)))
else:
  print(str(s) + " " + str(min(8, s + cnt)))

### FIXED CODE ###

N = int(input())
A = list(map(int, input().split()))
X = [0 for i in range(8)]
cnt = 0
for a in A:
  if a >= 3200:
    cnt += 1
  else:
    X[a // 400] = 1
s = sum(X)
if s == 0:
  print(str(1) + " " + str(cnt))
else:
  print(str(s) + " " + str(s + cnt))
D, N=map(int,input().split(' '))

assert N<100

print(N*100**D)



### FIXED CODE ###

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

if N>=100:
  N+=1

print(N*100**D)
S=input()
if S==Sunny:
  print('Cloudy')
elif S==Rainy:
  print('Sunny')
else:
  print('Rainy')

### FIXED CODE ###

S=input()
list=['Sunny','Cloudy','Rainy']

if S==list[0]:
  print(list[1])
elif S==list[1]:
  print(list[2])
else:
  print(list[0])
n,m=list(map(int,input().split()))
ists=[]
for i in range(m):
  s=list(map(int,inout().split()))
  ists.append(s)
ans=0
justified=True
for j in range(n):
  for k in range(m):
    if ists[k][0]<=j<=ists[k][1]:
      continue
    else:
      justified=False
      break
  if justified:
    ans+=1
print(ans)
  

### FIXED CODE ###

n,m=list(map(int, input().split() ))
Firstlis=[]
Secondlis=[]
for i in range(m):
  s=list(map(int,input().split()))
  S1=s[0]
  S2=s[1]
  Firstlis.append(S1)
  Secondlis.append(S2)
Min=max(Firstlis)
Max=min(Secondlis)
if Max>=Min:
    print(Max-Min+1)
else:
    print(0)
n=int(input())
d=sorted(map(int,input().split()))
m=int(input())
t=sorted(map(int,input().split()))

d_dic = dict()
t_dic = dict()

for i in range(n):
    d1 = d[i]
    if d1 not in d_dic.keys():
        d_dic[d1] = 1
    else:
        d_dic[d1] += 1
for i in range(m):
    t1 = t[i]
    if t1 not in t_dic.keys():
        t_dic[t1] = 1
    else:
        t_dic[t1] += 1

ans = 0

for i in t_dic.keys():
    if t_dic[i] > d_dic[i]:
        ans = 1
        break

if ans == 1:
    print("NO")
else:
    print("YES")

### FIXED CODE ###

n=int(input())
d=sorted(map(int,input().split()))
m=int(input())
t=sorted(map(int,input().split()))

d_dic = dict()
t_dic = dict()

for i in range(n):
    d1 = d[i]
    if d1 not in d_dic.keys():
        d_dic[d1] = 1
    else:
        d_dic[d1] += 1

ans = 0

for i in range(m):
    t1 = t[i]
    if t1 in d_dic.keys():
        d_dic[t1] -= 1
        if d_dic[t1] < 0:
            ans = 1
            break
    else:
        ans = 1
        break
    
if ans == 1:
    print("NO")
else:
    print("YES")
# 入力
monster_hp = int(input())
quantity_of_skills = int(input())
skills = map(int, input().split())
skills_list = [skills]

# 処理
total_damage = 0
for i in skills_list:
    total_damage += i

if monster_hp <= total_damage:
    print('Yes')
else:
    print('No')

### FIXED CODE ###

# 入力
monster_hp, quantity_of_skills = map(int, input().split())
skills = map(int, input().split())
skills_list = list(skills)

# 処理
total_damages = 0
for i in skills_list:
    total_damages += i

if monster_hp <= total_damages:
    print('Yes')
else:
    print('No')
N,L = [int(i) for i in input().split()]
S=[[i for i in input().strip()] for j in range(N)]
print(''.join(sorted(S)))

### FIXED CODE ###

N,L = [int(i) for i in input().split()]
S=[input().strip() for j in range(N)]
print(''.join(sorted(S)))
N,L = map(int, input().split())
S = 26*[""] 
for i in range(N):
    S[i] = input()

S.sort()

str = ""

for s in S:
    str += s

print(str)


### FIXED CODE ###

N,L = map(int, input().split())
S = N*[""] 
for i in range(N):
    S[i] = input()

S.sort()

str = ""

for s in S:
    str += s

print(str)
import math

d, g = map(int, input().split())
ls = [[100 * (i + 1)] + list(map(int,
                                 input().split())) for i in range(d)][::-1]
l0 = [a * p + c for a, p, c in ls]

res = float('inf')
for index in range(2**d):
    cs = '{:b}'.format(int(cs))
    cs = '0' * (d - len(cs)) + cs
    count = 0
    s = 0
    for i, c in enumerate(cs):
        if c == '1':
            count += ls[i][1]
            s += l0[i]
    if s < g:
        for i, c in enumerate(cs):
            if c == '0' and s + ls[i][0] * ls[i][1] >= g:
                n = math.ceil((g - s) / ls[i][0])
                count += n
                s += ls[i][0] * n
                break
    if s >= g:
        res = min(res, count)
print(res)

### FIXED CODE ###

import itertools
import math

d, g = map(int, input().split())
ls = [[100 * (i + 1)] + list(map(int, input().split())) for i in range(d)]
s0 = [a * p for a, p, _ in ls]
s1 = [a * p + c for a, p, c in ls]

res = float('inf')
for indices in itertools.permutations(range(d)):
    count = 0
    s = 0
    for i in indices:
        if s + s0[i] >= g:
            count += math.ceil((g - s) / (100 * (i + 1)))
            break
        else:
            count += ls[i][1]
            if count >= res:
                break
            s += s1[i]
            if s >= g:
                break
    res = min(res, count)
print(res)
r = int(input())
    g = int(input())
    x = (2*g) - r
    print(x)

### FIXED CODE ###

r = int(input())
g = int(input())
x = (2*g) - r
print(x)
import math

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

flg = 0
if h > 6:
  flg += 1
  x = 12 - h
  h = 6 - x

if m > 30:
  flg += 2
  mm = m -30

if flg == 1:
  mm = m + 30

if flg == 2:
  h += 6

c = (h * 60 * 0.5) + (m * 0.5)
d = mm * 6

if c > d:
  e = c - d
else:
  e = d - c

if e == 0:
  print(0.0)
else:
  ans = (a * a) + (b * b) - 2 * a * b * math.cos(math.radians(e))
  print(math.sqrt(ans))

### FIXED CODE ###

import math

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

c = (h * 60 * 0.5) + (m * 0.5)
d = m * 6

if c > d:
  e = c - d
else:
  e = d - c

ans = (a * a) + (b * b) - 2 * a * b * math.cos(math.radians(e))
print(math.sqrt(ans))
n,m=map(int, input().split())
h = [list(map(str,input().split())) for _ in range(m)]
# print(h)
for i in range(m):
    h[i][0] = int(h[i][0])
l=[]
penalty = 0
import numpy as np
p = np.zeros(n)
for i in range(m):
    if h[i][0] not in l:
        if h[i][1] == 'AC':
            l.append(h[i][0])
            penalty += p[i-1]
        else:
            p[h[i][0]-1] += 1
ansnum = len(l)

# for i in l:
#     penalty += p[i-1]

print(ansnum,int(penalty))

### FIXED CODE ###

n,m=map(int, input().split())
h = [list(map(str,input().split())) for _ in range(m)]
# print(h)
for i in range(m):
    h[i][0] = int(h[i][0])
l=set()
penalty = 0
import numpy as np
p = np.zeros(n)
for i in range(m):
    if h[i][0] not in l:
        if h[i][1] == 'AC':
            l.add(h[i][0])
            penalty += p[h[i][0]-1]
        else:
            p[h[i][0]-1] += 1
ansnum = len(l)

# for i in l:
#     penalty += p[i-1]

print(ansnum,int(penalty))
# coding: utf-8
# Here your code !
import itertools
ini = int(input().split(" ")[0])
negaset = [int(x) for x in input().split(" ")]
okset = sorted([str(i) for i in range (10) if i not in negaset]) 
#print(ini,okset)

for p in itertools.product(okset,repeat = 5):
    stp = int("".join(p))
    if stp >= ini:
        print(stp)
        break

### FIXED CODE ###

# coding: utf-8
# Here your code !
ipt = input().split(" ")
j,k =0,0
for i in [ int(i) for i in ipt]:
    if i == 5:
        k += 1
    elif i==7:
        j += 1
#    print(ipt,i,k,j)

if j == 1 and k == 2:
    print("YES")
else:
    print("NO")
import copy
N, M = map(int, input().split())
S = list(map(int, input().split()))
T = list(map(int, input().split()))
dp = [1] * (M+1)
dpleft = [0] * (M)
MOD = 10 ** 9 + 7

ndp = [1] * (M+1)
for n in range(N):
    #ndp = [1]
    for m in range(M):
        if S[n] == T[m]:
            #ndp.append(ndp[-1] + dp[m+1])
            ndp[m+1] = ndp[m] + dp[m+1]
            dpleft[m] = dp[m+1]
        else:
            ndp[m+1] = ndp[m] + dpleft[m]
            #ndp.append(ndp[m] + dpleft[m])
    dp = copy.deepcopy(ndp)
    print(dpleft)
print(dp[-1] % MOD)

### FIXED CODE ###

N, M = map(int, input().split())
S = list(map(int, input().split()))
T = list(map(int, input().split()))
dp = [1] * (M+1)
dpleft = [0] * (M)
MOD = 10 ** 9 + 7
ndp = [1] * (M+1)
for n in range(N):
    for m in range(M):
        if S[n] == T[m]:
            ndp[m+1] = ndp[m] + dp[m+1]
            dpleft[m] = dp[m+1]
        else:
            ndp[m+1] = ndp[m] + dpleft[m]
    dp = ndp[:]
print(dp[-1] % MOD)
C = []
C.append(list(map(int,input().split())))
C.append(list(map(int,input().split())))

if C[0][0] == C[1][2] and C[0][1] == C[1][1] and C[0][2] == C[1][0]:
  print("YES")
else:
  print("NO")

### FIXED CODE ###

C = []
C.append(input())
C.append(input())
 
if C[0][0] == C[1][2] and C[0][1] == C[1][1] and C[0][2] == C[1][0]:
  print("YES")
else:
  print("NO")
N,T=map(int,input().split())
s=list(map(int, input().split()))

t=[0,3,5,7,100,110,200,300,311]
ans=0
t_diff=[t[i+1]-t[i] for i in range(N-1)]
print(t_diff)
for i in t_diff:
    if i>T:
        ans+=T
    else:
        ans+=i
# 差分で足し合わせたので最後は計算に入ってない、最後は必ず被らないのでTを加える
print(ans+T)




### FIXED CODE ###

N,T=map(int,input().split())
t= list(map(int,input().split()))
ans=0
t_diff=[t[i+1]-t[i] for i in range(N-1)]
for i in t_diff:
    if i>T:
        ans+=T
    else:
        ans+=i
# 差分で足し合わせたので最後は計算に入ってない、最後は必ず被らないのでTを加える
print(ans+T)
A = -119
while A<= 120:
    B = -119
    while B<= 120:
        if A**5 - B**5 == X:
            break
        B += 1
    A+= 1

print('%d %d'%(A, B))

### FIXED CODE ###

X = int(input())

A = -119
while A<= 120:
    B = -119
    while B<= 120:
        if A**5 - B**5 == X:
            print('%d %d'%(A, B))
            break
        B += 1
    else:
        A+= 1
        continue
    break
S=input()
s=str(S)
if s[2]=s[3] and s[4]=s[5]:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

S=input()
if S[2]==S[3] and S[4]==S[5]:
  print("Yes")
else:
  print("No")
from fractions import gcd
from functools import reduce

def lcm(a,b):
    return int(a * b / gcd(a, b))

N, M = map(int,input().split())
A = sorted(list(map(int,input().split())))
lcmA = reduce(lcm, A)
if M < lcmA//2:
    print(0)
else:
    print( 1 + (M - lcmA//2)//lcmA)




### FIXED CODE ###

import fractions
import functools

def lcm(n1, n2):
    return n1 * n2 // fractions.gcd(n1, n2)

N, M = map(int, input().split())
A = list(map(int, input().split()))
for i in range(N):
    A[i] //= 2

lcmA = functools.reduce(lcm, A)
gcdA = functools.reduce(fractions.gcd, A)
if (lcmA // gcdA) % 2 == 0:
    print(0)
else:
    print((M // lcmA + 1) // 2)
S = int(input())
h = int(S // (60*60))
m = int(S / 60) % 60
s = S%60

print('{0}:{1}:{2}'.format(h.m.s))

### FIXED CODE ###

S = int(input())
h = int(S // (60*60))
m = int(S / 60) % 60
s = S%60

print('{}:{}:{}'.format(h,m,s))
N, Y = map(int, input().split())
result = [-1, -1, -1]
for a in range(0, N):
    for b in range(0, N):
        c = N-(a+b)
        if 10000*a + 5000*b + 1000*c:
            result[0] = a
            result[1] = b
            result[2] = c
print (" ".join(result))

### FIXED CODE ###

N, Y = map(int, input().split())
result = [-1, -1, -1]
for a in range(0, N+1):
    for b in range(0, N+1):
        c = N-a-b
        if c < 0:
            continue
        if Y == (10000*a + 5000*b + 1000*c):
            result[0] = a
            result[1] = b
            result[2] = c
print (" ".join(map(str, result)))
N = int(input())
A = list(int(i) for i in input().split())
count_m = 0
count_z = 0

for i in A:
  if i < 0:
    count_m += 1
  elif i == 0:
    count_z += 1

A_abs = [abs(i) for i in A]
if count_m%2 == 0 || (count_m+count_z)%2 == 0:
  print(sum(A_abs))
  
else:
  A_min = A.index(min(A_abs))
  A_abs[A_min] = A[A_min]*(-1)
  print(sum(A_abs))

### FIXED CODE ###

N = int(input())
A = list(int(i) for i in input().split())
count_m = 0
count_z = 0

for i in A:
  if i < 0:
    count_m += 1
  elif i == 0:
    count_z += 1

A_abs = [abs(i) for i in A]
if count_m%2 == 0 or (count_m+count_z)%2 == 0:
  print(sum(A_abs))
  
else:
  A_min = A_abs.index(min(A_abs))
  A_abs[A_min] = A_abs[A_min]*(-1)
  print(sum(A_abs))
A=int(input())
B=int(input())

C=A+B
D=A-B
E=A*B

print(max(C,D,E))


### FIXED CODE ###

i=list(map(int,input().split()))
C=i[0]+i[1]
D=i[0]-i[1]
E=i[0]*i[1]

print(max([C,D,E]))
# -*- coding: utf-8 -*-
# problem B
y, x = map(int, input())
for i in range(y):
    l = input()
    print(l)
    print(l)

### FIXED CODE ###

#!/usr/bin/env python
import sys
from collections import Counter
from itertools import permutations, combinations
from fractions import gcd
#from math import gcd
from math import ceil, floor
import bisect
sys.setrecursionlimit(10 ** 6)
inf = float("inf")

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

def main():
    h, w = map(int, input().split())
    C = [None] * h
    for i in range(h):
        C[i] = input()
    for i in range(h):
        print(C[i])
        print(C[i])

if __name__ == '__main__':
    main()
N, K = map(int, raw_input().split())
word = raw_input().split()
newword = ""
for i in xrange(N):
  if i == K - 1:
    if word[i] == "A":
      newword += "a"
    elif word[i] == "B":
      newword += "b"
    else:
      newword += "c"
  else:
    newword += word[i]
    
print newword

### FIXED CODE ###

N, K = map(int, raw_input().split())
word = raw_input()
newword = ""
for i in xrange(N):
  if i == K - 1:
    if word[i] == "A":
      newword += "a"
    elif word[i] == "B":
      newword += "b"
    else:
      newword += "c"
  else:
    newword += word[i]
    
print newword
S = str(input())
ans = 0

if len(S) <= 3:
    print(0)
else:   
    for i in range(len(S)-3):
        if S[i:i+3] % 2019 == 0:
            ans+=1
    print(ans)

### FIXED CODE ###

S = input()[::-1]

cnts = [0]*2019
cnts[0] = 1
num = 0
d = 1
ans = 0

for i in S:
    num += int(i) * d
    d *= 10
    num %= 2019
    d %= 2019
    cnts[num] += 1

for j in cnts:
    ans += j * (j-1) // 2 

print(ans)
S = input()
ans = min(max(map(len, S.split(c)))
          for c in [chr(i + 97) for i in range(26)]
          if c not in S)
print(ans)

### FIXED CODE ###

S = input()
ans = len(S)
for tgt in set(S):
    T = S
    while len(T) != T.count(tgt):
        U = ''
        for ab in zip(T, T[1:]):
            U += tgt if tgt in ab else ab[0]
        T = U
    ans = min(ans, len(S) - len(T))
print(ans)
import math

x1, y1, x2, y2 = [int(n) for n in raw_input().split()]
print math.sqrt(abs(x2 - x1) ** 2 + abs(y2 - y1) ** 2)

### FIXED CODE ###

import math

x1, y1, x2, y2 = [float(n) for n in raw_input().split()]
print math.sqrt(abs(x2 - x1) ** 2 + abs(y2 - y1) ** 2)
N,K = map(int,input().split())
beki_2 = list()
for i in range(15):
    beki_2.append(2**i)
    # print(beki_2)
eachother = [0]*N
ind = 0
i = 0
# print(beki_2)
f =0
while all:
    if(i == 0):
        j = 0
        while all:
            if(1*beki_2[j] >= K):
                ind = j
                # print("i")
                eachother[i] = ind
                break
            # print(j,beki_2[j])
            j+=1
        i+=1
    else:
        # print(i+1,beki_2[ind],ind)
        
        if(ind == 0):
            if(i+1>=K):
                eachother[i] = 0
                # print("i+1>=K")
                ind = 0
            else:
                for l in range(len(beki_2)):
                    if((i+1)*beki_2[l]>=K):
                        eachother[i] = 1
                        break
                ind = 1
            i+=1

        if((i+1)*beki_2[ind]<K):
            eachother[i] = ind+1
            i +=1
        # print((i+1)*beki_2[ind],ind,i)

    ind -= 1

    if(i == N or ind == -1):
        # print(i,N)
        break
sum_each = 0.0

for i in range(len(eachother)):
    sum_each+=beki_2[eachother[0]]/beki_2[eachother[i]]

# print(eachother[0:10])
print((1/N)*sum_each/beki_2[eachother[0]])

### FIXED CODE ###

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

two_beki = [1]*20
for i in range(1,20):
    two_beki[i] = 2**i
#[1,2,4,8,16,32,64,128,256,512,1024,2048,8192,16384]
n = N+1
list_index = list()
for I in range(1,n):
    for J in range(20):
        if(I*two_beki[J]>=K):
            list_index.append(J) 
            # print(J,I*two_beki[J])
            break
#print(list_index)
sum_harf = 0.0
for I in list_index:
    sum_harf += 1/two_beki[I]/N
print(sum_harf)
def min_diag(A,B,C):
  segments=[A,B,C]
  segments.sort()
  return (segments[0]**2+segments[1]**2)**(1/2)

while True:
  # input one dataset
  A,B,C = tuple(map(float,input().split()))
  if (A,B,C) == (0,0,0):
    break
  n = int(input())
  R = [None]*n
  for i in range(n):
    R[i] = float(input())
  # process
  min_diag = min_diag(A,B,C)
  # judge & output
  for r in R:
    if min_diag < 2*r:
      print("OK")
    else:
      print("NA")

### FIXED CODE ###

def min_diam(A,B,C): # returns a "diameter"
  segments=[A,B,C]
  segments.sort()
  return (segments[0]**2+segments[1]**2)**(1/2)

while True:
  # input one dataset
  A,B,C = tuple(map(float,input().split()))
  if (A,B,C) == (0,0,0):
    break
  n = int(input())
  R = [None]*n
  for i in range(n):
    R[i] = float(input())
  # process
  diam = min_diam(A,B,C)
  # judge & output
  for r in R:
    if diam < 2*r:
      print("OK")
    else:
      print("NA")
from sympy import isprime
X=int(input())

while 1==1:
    if isprime(X)==True:
        print(X)
        quit()
    
    X+=1

### FIXED CODE ###

X=int(input())

def isPrime(n):
  if n < 2:
    # 2未満は素数でない
    return False
  if n == 2:
    # 2は素数
    return True
  for p in range(2, n):
      if n % p == 0:
        # nまでの数で割り切れたら素数ではない
        return False
  # nまでの数で割り切れなかったら素数
  return True
  
while 1==1:
    if isPrime(X)==True:
        print(X)
        quit()
    X+=1