Harryxun/stf_run huggingface dataset:
n,x= map(int,input().split())
a = input().rstrip().split() 
b = [0]*n

for i in range(0,n):
    b[i]=abs(int(a[i])-x)
b.sort()#昇順

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

def multi_GCD(le):
    # print(le)
    if len(le)==1:
        return 
    mxle=le[-1]
    del(le[-1])
    le[-1]=GCD(le[-1],mxle)
    multi_GCD(le)

if(len(b)==1):
    print(b[0])
if(len(b)==2):
    print(GCD(b[0],b[1]))
if(len(b)>2):
    multi_GCD(b)
    print(b[0])


### FIXED CODE ###

import sys
sys.setrecursionlimit(500000)

n,x= map(int,input().split())
a = input().rstrip().split()
b = [0]*n
# a
for i in range(0,n):
    b[i]=abs(int(a[i])-x)
b.sort()#昇順

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

def multi_GCD(le):
    # print(le)
    if len(le)==1:
        return
    mxle=le[-1]
    del(le[-1])
    le[-1]=GCD(le[-1],mxle)
    multi_GCD(le)

if(len(b)==1):
    print(b[0])
if(len(b)==2):
    print(GCD(b[0],b[1]))
if(len(b)>2):
    multi_GCD(b)
    print(b[0])
S = int(input())
h = S//3600
m = (S//60)-(S//3600)
s = S//60
print(h:m:s)



### FIXED CODE ###

S = int(input())
h = S//3600
m = (S//60)-60*(S//3600)
s = S%60
print('{}:{}:{}'.format(h,m,s))
n=int(input().split())
arr=list(map(int,input().split()))
res=[arr[0]]
for i in range(1,n):
  if arr[i]>=res[-1]:
    res.append(arr[i])
print(len(res))

### FIXED CODE ###

N=int(input())
H=list(map(int,input().split()))
ans,ma=0,H[0]
for i in H:
	if ma<=i:
		ans+=1
		ma=i
print(ans)
H,W,K=map(int, input().split())
C=[list(input().split())for _ in range(H)]

#H,Wが小さいことが肝
#つまり全通り試してみる

#itertoolのうちpermutationが順列、combinationが組み合わせ
#productが直積

ans=0
import itertools
tf=("Yes", "No")
for l in itertools.product(tf, repeat=(H+W)):
  L=list(l)
black=0
for i in range(2**(H+W)):
  for j in range(H):
    for k in range(W):
      if l[i][j]=="No", l[i][H+k]="No", C[j][k]="#":
        black+=1
  if black=K:
    ans+=1
    black=0
print(ans)

### FIXED CODE ###

H,W,K=map(int, input().split())
C=list(input()for _ in range(H))
ans=0
import itertools
tf=("Yes", "No")
l=list(itertools.product(tf, repeat=(H+W)))
black=0
for i in range(2**(H+W)):
  for j in range(H):
    for k in range(W):
      if l[i][j]=="No"and l[i][H+k]=="No"and C[j][k]=="#":
        black+=1
  if black==K:
    ans+=1
  black=0
print(ans)
l=[list(map(int,input().split())) for i in range(3)]
n=int(input())
li=set(input() for ini in range(n))
d=[0 for i in range(9)]
for j in range(3):
  for i in range(3):
    if l[j][i] in li:d[3*j+i]=1
if set(1) in [set(l[h::3])for h in range(3)]+[set(l[h:h+3])for h in range(3)]+[set([l[0],l[4],l[8]]),set([l[2],l[4],l[6]])]:
  print("Yes")
else:print("No")

### FIXED CODE ###

l=[list(map(int,input().split())) for i in range(3)]
l=sum(l,[])
n=int(input())
li=set([int(input()) for ini in range(n)])
d=[0 for i in range(9)]
for g in range(9):
  if l[g] in li:d[g]=1

for a,s,x in [(0,1,2),(3,4,5),(6,7,8),(0,4,8),(2,4,6),(0,3,6),(1,4,7),(2,5,8)]:
  if d[a]==d[x]==d[s]==1:
    print("Yes");exit()
print("No")
import math
from collections import deque

N = int(input())

a = []
b = []
for i in range(N):
    i1, i2 = map(int, input().split())
    g = math.gcd(i1,i2)
    if g == 0:
        a.append(i1)
        b.append(i2)
        continue
    x = i1 // g
    y = i2 // g
    if x < 0:
        x = - x
        y = - y 
    a.append(x)
    b.append(y)

P = {}
for i in range(N):
    if b[i] < 0:
        tmp = b[i]
        b[i] = a[i]
        a[i] = - tmp
        sgn = 1
    elif a[i] == 0:
        a[i] = b[i]
        b[i] = 0
        sgn = 1
    else :
        sgn = 0

    if (a[i],b[i]) in P:
        P[(a[i],b[i])][sgn]=P[(a[i],b[i])][sgn] + 1
    elif sgn == 0 :
        P[(a[i],b[i])]=[1,0]
    else :
        P[(a[i],b[i])]=[0,1]
        

MOD = 1000000007
a1 = 1 
ans0=0
for k in P:
    if k == (0,0):
        ans0 = P[k][0]
    else:
        a1 = a1*(pow(2,P[k][0],MOD)+pow(2,P[k][1],MOD) - 1) % MOD

if ans0 != 0:
    ans = ans0 + a1 -1
else:
    ans = a1 -1
print(ans%MOD)



### FIXED CODE ###

N = int(input()) % 10

if (N == 3):
    print('bon')
elif (N == 0 or N == 1 or N == 6 or N == 8):
    print('pon')
else :
    print('hon')
for i in range(1,13):
    t[i] = 0

s = t
h = t
c = t
d = t

num = int(input())
for i in range(num):
    m, n = input().split()
    n = int(n)
    if m == "s":
        s[n] == 1
    if m == "h":
        h[n] == 1
    if m == "c":
        h[n] == 1
    if m == "d":
        h[n] == 1

for i in range(1,13):
    if s[i] == 0:
        print("S %d" i)

for i in range(1,13):
    if h[i] == 0:
        print("H %d" i)

for i in range(1,13):
    if c[i] == 0:
        print("C %d" i)

for i in range(1,13):
    if d[i] == 0:
        print("S %d" i)






### FIXED CODE ###

#
# 6b
#

def main():
    n = int(input())
    c = []
    for i in range(n):
        m, r = input().split()
        r = int(r)
        c.append([m, r])
    for M in ["S", "H", "C", "D"]:
        for R in range(1, 14):
            for i in range(n):
                if c[i] == [M, R]:
                    break
            else:
                print(*[M, R])


if __name__ == '__main__':
    main()
# C

import math
from functools import reduce


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

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

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

def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)
result = 0
mod = lcm_list(a)-1

for i in range(len(a)):
    result += mod % a[i] 

print(result)

### FIXED CODE ###

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

print(sum(a) - n)
n, a, b = map(int, input().split())
if n%(a+b) < a:
    print(n//(a+b)*a+n%(a+b))
else:
    print(n//(a+b)*a+a)

### FIXED CODE ###

import math
a, b = map(int, input().split())
x = []
y = []
for i in range(math.ceil(b/0.1), math.floor((b+1)/0.1)):
    y.append(i)
for i in range(math.ceil(a/0.08), math.floor((a+1)/0.08)):
    x.append(i)
    if y.count(i) == 1:
        print(i)
        exit()
print('-1')
n,m,k=map(int,input().split())
A=list(map(int,input().split()))
B=list(map(int,input().split()))
a=[0]
b=[0]
for i in range(N):
	a.append(a[i] + A[i])
for i in range(M):
	b.append(b[i] + B[i])
ans, j = 0, M
for i in range(N + 1):
	if a[i] > K:
		break
	while b[j] > K - a[i]:
		j -= 1
	ans = max(ans, i + j)
print(ans)


### FIXED CODE ###

N,M,K=map(int,input().split())
A=list(map(int,input().split()))
B=list(map(int,input().split()))
a=[0]
b=[0]
for i in range(N):
	a.append(a[i] + A[i])
for i in range(M):
	b.append(b[i] + B[i])
ans, j = 0, M
for i in range(N + 1):
	if a[i] > K:
		break
	while b[j] > K - a[i]:
		j -= 1
	ans = max(ans, i + j)
print(ans)
k = input()
z = int(k)
s = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
print (s[z])

### FIXED CODE ###

k = input()
z = int(k)
s = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
print (s[z-1])
h, w = map(int, input().split())

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

for i in range(1,h-1):
    for j in range(1, w-1):
        if s[i][j]=="#" and s[i+1][j]=="." and s[i][j+1]=="." and s[i-1][j]=="." and s[i][j-1]==".":
            print("No")
            exit()

for j in range(1,w-1):
    if s[0][j] == "#" and s[1][j] == "." and s[0][j + 1] == "." and s[0][j - 1] == ".":
        print("No")
        exit()
    if s[h-1][j] == "#" and s[h-2][j] == "." and s[h-1][j + 1] == "." and s[h-1][j - 1] == ".":
        print("No")
        exit()


for i in range(1,h-1):
    if s[i][0] == "#" and s[i + 1][0] == "." and s[i][1] == "." and s[i - 1][0] == ".":
        print("No")
        exit()
    if s[i][w-1] == "#" and s[i + 1][w-1] == "." and s[i][w-2] == "." and s[i - 1][w-1] == ".":
        print("No")
        exit()

if s[0][0]=="#" and s[1][0]=="." and s[0][1]==".":
    print("No")
    exit()

if s[h-1][0]=="#" and s[h-1][1]=="." and s[h-2][0]==".":
    print("No")
    exit()

if s[0][w-1]=="#" and s[1][w-1]=="." and s[0][w-2]==".":
    print("No")
    exit()

if s[h-1][w-1]=="#" and s[h-1][w-2]=="." and s[h-2][s-1]==".":
    print("No")
    exit()

print("Yes")

### FIXED CODE ###

h, w = map(int, input().split())

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

for i in range(1,h-1):
    for j in range(1, w-1):
        if s[i][j]=="#" and s[i+1][j]=="." and s[i][j+1]=="." and s[i-1][j]=="." and s[i][j-1]==".":
            print("No")
            exit()

for j in range(1,w-1):
    if s[0][j] == "#" and s[1][j] == "." and s[0][j + 1] == "." and s[0][j - 1] == ".":
        print("No")
        exit()
    if s[h-1][j] == "#" and s[h-2][j] == "." and s[h-1][j + 1] == "." and s[h-1][j - 1] == ".":
        print("No")
        exit()


for i in range(1,h-1):
    if s[i][0] == "#" and s[i + 1][0] == "." and s[i][1] == "." and s[i - 1][0] == ".":
        print("No")
        exit()
    if s[i][w-1] == "#" and s[i + 1][w-1] == "." and s[i][w-2] == "." and s[i - 1][w-1] == ".":
        print("No")
        exit()

if s[0][0]=="#" and s[1][0]=="." and s[0][1]==".":
    print("No")
    exit()

if s[h-1][0]=="#" and s[h-1][1]=="." and s[h-2][0]==".":
    print("No")
    exit()

if s[0][w-1]=="#" and s[1][w-1]=="." and s[0][w-2]==".":
    print("No")
    exit()

if s[h-1][w-1]=="#" and s[h-1][w-2]=="." and s[h-2][w-1]==".":
    print("No")
    exit()

print("Yes")
import math

#ans^2 = A^2 +B^2 - 2ABconDiffを使用
line = input().split(" ")
A = int(line[0])
B = int(line[1])
H = int(line[2])
M = int(line[3])

ans = 0

#Aの刺す分
ang_a = H * 5 + M/12
#Bの刺す時間
ang_b = M

if ang_a == ang_b:
    ans = A - B

else:
    diff = abs(ang_a-ang_b)
    theta = (diff / 60) * 360
    ans_pow = A**2 + B**2 - 2 * A * B * math.cos(math.radians(theta))
    ans = ans_pow**0.5

print(ans_pow)
print(ans)



### FIXED CODE ###

# coding: utf-8

import math

#ans^2 = A^2 +B^2 - 2ABconDiffを使用
line = input().split(" ")
A = int(line[0])
B = int(line[1])
H = int(line[2])
M = int(line[3])

ans = 0

#Aの刺す分
ang_a = H * 5 + M/12
#Bの刺す時間
ang_b = M

if ang_a == ang_b:
    ans = A - B

else:
    diff = abs(ang_a-ang_b)
    theta = (diff / 60) * 360
    ans_pow = A**2 + B**2 - 2 * A * B * math.cos(math.radians(theta))
    ans = ans_pow**0.5

print(ans)
import collections as co

n = int(input())
s = [input() for i in range(n)]

c = co.Counter(s)
max = c.most_common()[0][1]
r = 1
i = 0

while r == 1:
  if max == c.most_common()[i][1]:
    print(c.most_common()[i][0])
  else:
    r = 0
  i += 1


### FIXED CODE ###

import collections
n = int(input())
s = [input() for _ in range(n)]
c = collections.Counter(s)
C = c.most_common()
most_count = C[0][1]
answer = []

for i in range(len(C)):
  if most_count == C[i][1]:
    answer.append(C[i][0])

answer.sort()
for i in answer:
    print(i)
print(*input.split(",")

### FIXED CODE ###

a,b,c = input().split(",")
print(a, b, c)
a, b = map(int, input().split())
if( b % a === 0){
  print a + b
} else {
  print b - a 
}


### FIXED CODE ###

a, b = map(int, input().split())
if b % a == 0:
  print(a + b)
else:
  print(b - a)
from sys import stdin
from itertools import repeat
def main():
    n, m = map(int, stdin().readline().split())
    dat = map(int, stdin.read().split(), repeat(10, 2 * m))
    c = [0] * (n + 1)
    for x in dat:
        c[x] += 1
    for i in xrange(n + 1):
        if c[i] == 1:
            print "NO"
            return
    print "YES"
main()


### FIXED CODE ###

from sys import stdin
from itertools import repeat
def main():
    n, m = map(int, stdin.readline().split())
    dat = map(int, stdin.read().split(), repeat(10, 2 * m))
    c = [0] * (n + 1)
    for x in dat:
        c[x] += 1
    f = 0
    for i in xrange(n + 1):
        if c[i] & 1:
            print "NO"
            return
    print "YES"
main()
#-------------------------------------------------------------------
# 約数を高速で列挙するコード(Python)
# https://qiita.com/LorseKudos/items/9eb560494862c8b4eb56
def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    # divisors.sort()
    return divisors
#-------------------------------------------------------------------
import random
def is_prime3(q,k=50):
    q = abs(q)
    #計算するまでもなく判定できるものははじく
    if q == 2: return True
    if q < 2 or q&1 == 0: return False

    #n-1=2^s*dとし（但しaは整数、dは奇数)、dを求める
    d = (q-1)>>1
    while d&1 == 0:
        d >>= 1
    
    #判定をk回繰り返す
    for i in xrange(k):
        a = random.randint(1,q-1)
        t = d
        y = pow(a,t,q)
        #[0,s-1]の範囲すべてをチェック
        while t != q-1 and y != 1 and y != q-1: 
            y = pow(y,2,q)
            t <<= 1
        if y != q-1 and t&1 == 0:
            return False
    return True

#-------------------------------------------------------------------
#Python -3.4.x
from fractions import gcd
#-------------------------------------------------------------------
import sys
def p(*_a):
  _s=" ".join(map(str,_a))
  #print(_s)
  sys.stderr.write(_s+"\n")
#-------------------------------------------------------------------
a,b = map(int, input().split())			# "5 7" -> ["5", "7"] -> 5, 7 => N=5,K=7

g=gcd(a,b)
#p('g ', g)
L=make_divisors(g)

#p( gcd(a,b) )
#p( L )

ans=1
for l in L:
	#if a%l==0 and b%l==0: ans+=1
	if is_prime3(l): ans+=1

print(ans)


### FIXED CODE ###

#-------------------------------------------------------------------
def make_divisors(n):
    divisors = set()
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.add(i)
            if i != n // i:
                divisors.add(n//i)
    return divisors
#-------------------------------------------------------------------
import random
def is_prime(n):
    if n == 2: return True
    if n == 1 or n & 1 == 0: return False
 
    d = (n - 1) >> 1
    while d & 1 == 0:
        d >>= 1
 
    for k in range(100):
        a = random.randint(1, n - 1)
        t = d
        y = pow(a, t, n)
 
        while t != n - 1 and y != 1 and y != n - 1:
            y = (y * y) % n
            t <<= 1
 
        if y != n - 1 and t & 1 == 0:
            return False
 
    return True

#-------------------------------------------------------------------
#Python -3.4.x
from fractions import gcd
#-------------------------------------------------------------------
import sys
def p(*_a):
  _s=" ".join(map(str,_a))
  #print(_s)
  sys.stderr.write(_s+"\n")
#-------------------------------------------------------------------
a,b = map(int, input().split())			# "5 7" -> ["5", "7"] -> 5, 7 => N=5,K=7

g=gcd(a,b)
#p('g ', g)
L=make_divisors(g)

#p( gcd(a,b) )
#p( L )

ans=1
for l in L:
	#if a%l==0 and b%l==0: ans+=1
	if is_prime(l): ans+=1

print(ans)
def dist(x1, y1, x2, y2):
    return pow((x1 - x2)**2 + (y1 - y2)**2, 0.5)


def dist_high(i, now):
    if i == -1 and now == -1:
        return dist(stx, sty, enx, eny)
    if now == -1:
        result = dist(stx, sty, xyr[i][0], xyr[i][1])
        result -= xyr[i][2]
    elif i == -1:
        result = dist(xyr[now][0], xyr[now][1], enx, eny)
        result -= xyr[now][2]
    else:
        result = dist(xyr[now][0], xyr[now][1], xyr[i][0], xyr[i][1])
        result -= xyr[i][2] + xyr[now][2]
    return result if result > 0 else 0


debugs = []
def debug(**args):
    debugs.append(args)
    return args["ret"]
def d():
    for i in debugs:
        print(i)


stx, sty, enx, eny = map(int, input().split())
n = int(input())
xyr = [list(map(int, input().split())) for x in range(n)]
xyr = list(sorted(xyr, key=lambda x: dist(stx, sty, x[0], x[1])))

dp = [[False for y in range(1001)] for x in range(1001)]
def calc(i, now):
    if dp[i][now] != False:
        return dp[i][now]

    if i >= n:
        return dist_high(-1, now)
    dp[i][now] = min(
            calc(i + 1, i) + dist_high(i, now),
            calc(i + 1, now)
            )
    return dp[i][now]


print(calc(0, -1))


### FIXED CODE ###

def dist(x1, y1, x2, y2):
    return ((x1 - x2)**2 + (y1 - y2)**2)**0.5


def dist_high(index1, index2):
    return max(dist(
            xyr[index1][0],
            xyr[index1][1],
            xyr[index2][0],
            xyr[index2][1]) - (xyr[index1][2] + xyr[index2][2]), 0)


def min_value_index(array):
    min_value = float("inf")
    min_index = -1
    for i, v in array:
        if min_value > v:
            min_value = v
            min_index = i
    return min_value, min_index

stx, sty, enx, eny = map(int, input().split())
n = int(input())
xyr = [[stx, sty, 0]] + [list(map(int, input().split())) for x in range(n)] + [[enx, eny, 0]]

nodes = {x: float("inf") for x in range(len(xyr))}
nodes[0] = 0
now = 0

while now != (len(xyr) - 1):
    for i in nodes.keys():
        if i == now:
            continue

        nodes[i] = min(nodes[i], nodes[now] + dist_high(now, i))
    del nodes[now]
    now = min_value_index(nodes.items())[1]
print(nodes[n + 1])
import math
n = int(input())

a = []
m = math.floor(a**(1/2))
for i in range(1,m + 1):
    if n % i == 0:
        a.append(i + (n/i) - 2)

print(int(min(a)))


### FIXED CODE ###

import math
n = int(input())

a = []
m = math.floor(n**(1/2))
for i in range(1,m + 1):
    if n % i == 0:
        a.append(i + (n/i) - 2)

print(int(min(a)))
from itertools import accumulate 

N, K = list(map(int, input().split()))
P = list(map(lambda x: int(x) - 1, input().split()))
C = list(map(int, input().split()))

ans = -10**9-1
seen = [False]*N
for i in range(N):
    if seen[i]:
        continue
    loop = []
    now = i
    while seen[now] == False:
        seen[now] = True
        loop.append(C[now])
        now = P[now]
    loop_size = len(loop)
    loop_score = sum(loop)
    cumsum = list(accumulate(loop+loop))
    for j in range(1, loop_size+1):
        for l in range(loop_size+1):
            r = l+j
            subseq = cumsum[r] - cumsum[l]
            ans = max(ans, subseq, subseq+loop_score*((K-j)//loop_size))
print(ans)

### FIXED CODE ###

N, K = list(map(int, input().split()))
P = list(map(lambda x: int(x) - 1, input().split()))
C = list(map(int, input().split()))
ans = -10**9-1
for i in range(N):
    cumsum = [0]*(N+1)
    seen = [-1]*N
    K_ = K
    now = i
    j = 0
    while K_ > 0 and seen[now] == -1:
        seen[now] = 1
        now = P[now]
        cumsum[j+1] = cumsum[j] + C[now]
        K_ -= 1
        j += 1
    if K_ == 0:
        ans = max(ans, max(cumsum[1:j+1]))
    else:
        if cumsum[j] > 0:
            loop_size = j
            loop_n = K//loop_size - 1
            tmp = loop_n*cumsum[loop_size]
            tmp += max(max(cumsum[1:loop_size+1]), cumsum[loop_size] + max(cumsum[0:K_%loop_size+1]))
            ans = max(ans, tmp)
        else:
            ans = max(ans, max(cumsum[1:j+1]))
print(ans)
import sys
from decimal import Decimal

def main():

    #input_strings = sys.stdin.readlines()
    for coef_and_cons in input_strings:
        a, b, c, d ,e, f = map(Decimal, coef_and_cons.split())
        x = (f/e - c/b) / (d/e - a/b)
        y = (f/d - c/a) / (e/d - b/a)
        print('%.3f %.3f' %  (x.quantize(Decimal('0.001'), rounding='ROUND_HALF_DOWN'),
                              y.quantize(Decimal('0.001'), rounding='ROUND_HALF_DOWN') )
             )


main()

### FIXED CODE ###

import sys
from decimal import Decimal
from fractions import Fraction

def main():

    input_strings = sys.stdin.readlines()
    for matrix_string in input_strings:
        matrix = list(map(Fraction, list(matrix_string.split())))
        if matrix[0] == 0:
            matrix = matrix[3:] + matrix[:3]
        matrix = list(map(lambda x: x / matrix[0], matrix[:3])) + matrix[3:]
        matrix = matrix[:3] + list(map(lambda x: x[1] - matrix[3] * x[0], zip(matrix[:3], matrix[3:])))
        matrix = matrix[:3] + list(map(lambda x: x / matrix[4], matrix[3:]))
        matrix = list(map(lambda x: x[0] - matrix[1] * x[1], zip(matrix[:3], matrix[3:]))) + matrix[3:]
        matrix = list(map(float, matrix))
        matrix = list(map(Decimal, matrix))
        matrix = list(map(lambda x: x.quantize(Decimal('.001'), rounding='ROUND_HALF_UP'), matrix))

        print('%.3f %.3f' % (matrix[2], matrix[5]))
main()
def main():
    from builtins import int, map, list, print, len
    import sys
    sys.setrecursionlimit(10 ** 6)

    X = int(input())
    t = []
    i = 0
    while True:
        x = i ** 5
        t.append(x)
        if x > 10 ** 9:
            break
        i += 1
    d = {}
    for i in range(len(t)):
        for j in range(len(t)):
            d[t[i] - t[j]] = [i, j]
            d[t[i] + t[j]] = [i, -j]
            d[-t[i] - t[j]] = [-i, j]
            d[-t[i] + t[j]] = [-i, -j]
    print(d[X][0], d[X][1])


if __name__ == '__main__':
    main()


### FIXED CODE ###

def main():
    from builtins import int, map, list, print, len
    import sys
    sys.setrecursionlimit(10 ** 6)

    X = int(input())
    t = []
    i = 0
    while True:
        x = i ** 5
        t.append(x)
        if x > 10 ** 12:
            break
        i += 1
    d = {}
    for i in range(len(t)):
        for j in range(len(t)):
            d[t[i] - t[j]] = [i, j]
            d[t[i] + t[j]] = [i, -j]
            d[-t[i] - t[j]] = [-i, j]
            d[-t[i] + t[j]] = [-i, -j]
    print(d[X][0], d[X][1])


if __name__ == '__main__':
    main()
import sys
import math
#a = []
#for l in sys.stdin:
#    a.append(int(l))
a = int(input())
b = int(input())
h = int(input())
m = int(input())

kak1 = float(h * 30 + m * 0.5)
kak2 = m * 6

kaku = kak1 -kak2 if kak1 < kak2 else kak2 - kak1
result = a * a + b * b - 2 * a * b * math.cos(kaku * math.pi / 180)
print(math.sqrt(result))

### FIXED CODE ###

import sys
import math

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

kak1 = float(h * 30 + m * 0.5)
kak2 = m * 6

kaku = kak1 -kak2 if kak1 < kak2 else kak2 - kak1
result = a * a + b * b - 2 * a * b * math.cos(kaku * math.pi / 180)
print(math.sqrt(result))
N,M,Q=map(int,input().split())
a=[]
b=[]
c=[]
d=[]
for i in range(Q):
  ta,tb,tc,td=map(int,input().split())
  a+=[ta]
  b+=[tb]
  c+=[tc]
  d+=[td]
maxs=0
A=[0 for i in range(10)]
for i in range(10):
  for j in range(i,10):
    for k in range(j,10):
      for l in range(k,10):
        for m in range(l,10):
          for n in range(m,10):
            for o in range(n,10):
              for p in range(o,10):
                for q in range(p,10):
                  for r in range(q,10):
                    A[0]=i
                    A[1]=j
                    A[2]=k
                    A[3]=l
                    A[4]=m
                    A[5]=n
                    A[6]=o
                    A[7]=p
                    A[8]=q
                    A[9]=r
                    su=0
                    for z in range(Q):
                      if A[b[z]+1]-A[a[z]+1]==c[z]:
                        su+=d[z]
                    if su>maxs:
                      maxs=su
print(maxs)

### FIXED CODE ###

N,M,Q=map(int,input().split())
a=[]
b=[]
c=[]
d=[]
for i in range(Q):
  ta,tb,tc,td=map(int,input().split())
  a+=[ta]
  b+=[tb]
  c+=[tc]
  d+=[td]
maxs=0
A=[0 for i in range(10)]
for i in range(M):
  for j in range(i,M):
    for k in range(j,M):
      for l in range(k,M):
        for m in range(l,M):
          for n in range(m,M):
            for o in range(n,M):
              for p in range(o,M):
                for q in range(p,M):
                  for r in range(q,M):
                    A[0]=i
                    A[1]=j
                    A[2]=k
                    A[3]=l
                    A[4]=m
                    A[5]=n
                    A[6]=o
                    A[7]=p
                    A[8]=q
                    A[9]=r
                    su=0
                    for z in range(Q):
                      if A[b[z]-1]-A[a[z]-1]==c[z]:
                        su+=d[z]
                    if su>maxs:
                      maxs=su
print(maxs)
a=[int(input()) for i in range(10)]
a.sort()
a=a[::-1]
a=a[-4]
print(a[0])
print(a[1])
print(a[2])

### FIXED CODE ###

a=[]
for i in range(10):
    a.append(input())
a.sort()
a=a[::-1]
a=a[:3]
print(a[0])
print(a[1])
print(a[2])
N, K = map(int, input().split())
lis = list(map(int, input().split()))
count = 0
for i in range(N):
    if lis[i] >= K:
        count += 1
print(count) 

### FIXED CODE ###

N = int(input())
count = 0
for i in range(1, N + 1):
    if i % 2 == 1:
        count = count + 1
print(count/N)