Harryxun/stf_run huggingface dataset:
n = int(input())
A = list(map(int,input().split()))
A = sorted(A)
x = A[-1]-A[0]
print(x)


### FIXED CODE ###

n = int(input())

if n%2==0:
    print(n)

else:
    print(2 * n)
s=input()
c=[]
f=[]
for num in range(len(s)):
    if s[num] == 'C':
        c.append(num)
    if s[num] == 'F':
        f.append(num)
print('Yes') if min(c) < max(f) else print('No')


### FIXED CODE ###

s=input()
c=[]
f=[]
for num in range(len(s)):
    if s[num] == 'C':
        c.append(num)
    if s[num] == 'F':
        f.append(num)
        
if 'C' in s and 'F' in s:
	print('Yes') if min(c) < max(f) else print('No')
else:
  print('No')
n = int(input())
l = list(map(int,input().split()))

ans = 0

for i in range(n-2):
    tmp = list([l[i],l[i+1],l[i+2]])
    if max(tmp) != tmp[1] and min(tmp) != tmp[1]:
        ans += 1
print(ans)


### FIXED CODE ###

s = list(map(str, input()))

if s.count(s[0])==2:
    s_rm = [i for i in s if i != s[0]]
    if s_rm[0] == s_rm[1]:
        print("Yes")
    else:
        print("No")
else:
    print("No")
N, K = map(int, input().split())
S = input()

S[K] -= 26

print(S)

### FIXED CODE ###

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

S[K-1] = chr(ord(S[K-1]) + 32)

print("".join(S))
a = input()
big = range('A', 'Z')

if big.include(a):
    print 'A'
else:
    print 'a'


### FIXED CODE ###

a = input()

if a.islower():
    print('a')
else:
    print('A')
N=int(input())
S=list(input())
n=0
for i in range(1,N-1):
	for j in range(i+1,N):
		for k in range(j+1,N+1):
			if j-i!=k-j and 1<=i and i<j and j<k <=N and S[i-1]!=S[j-1] and S[j-1]!=S[k-1] and S[k-1]!=S[i-1]:
				n+=1
print(n)

### FIXED CODE ###

N=list(input())
if N.count("7")!=0:
	print("Yes")
else:
    print("No")
N,X,T=int(input())
if  N%X==0:
  print((N/X)*T)
else:
  print((N/X +1)*T)

### FIXED CODE ###

N,X,T= map(int, input().split())
if N%X==0:
  print((N//X)*T)
else:
  print(((N//X)+1)*T)
s = input()
wordList =[ "eraser", "erase","dreamer", "dream"]
ansList = []
def ansFunc(s1, ansList):
    #ansCount = 0
    for w in wordList:
        #print(s1, w)
        if s1.startswith(w):
            s2 = s1.replace(w, "",1)
            if s2 == '':
                print("YES")
                ansList.append(1)
            else:
                ansFunc(s2, ansList)
ansFunc(s, ansList)
if len(ansList) ==0:
    print("NO")

### FIXED CODE ###

s=input().replace("eraser","").replace("erase","").replace("dreamer","").replace("dream","")
if s:
    print("NO")
else:
    print("YES")
n=int(input())
A=[[]for i in range(n)]
A[0].append(1)
for i in range(2,n+1):
  for j in range(i-1):
    A[i-1].append(A[i-2][j]*i)
  A[i-1].append(A[i-1][-1]+A[i-2][0])
X=list(map(int,input().split()))
Y=[X[1]-X[0]]
for i in range(2,n):
  Y.append(X[i]-X[i-1])
ans=0
for i in range(n-1):
  ans=(ans+A[n-2][i]*Y[i])%(10**9+7)
print(ans)


### FIXED CODE ###

n=int(input())
A=[[0]*2 for i in range(n)]
for i in range(n):
  A[i][0],A[i][1]=input().split()
  A[i][1]=int(A[i][1])
x=input()
for i in range(n):
  if A[i][0]==x:
    break
ans=0
for j in range(i+1,n):
  ans=ans+A[j][1]
print(ans)
h,w=map(int,input().split())
A=[list(input()) for i in range(h)]
B=[]
for i in range(w):
  for j in range(h):
    if A[i][j]=="#":
      B.append([i,j])
ans=0
for i in range(w):
  for j in range(h):
    if [i,j] not in B:
      d=min(abs(i-b[0])+abs(j-b[1]) for b in B)     
      ans=max(d,ans)
print(ans)

### FIXED CODE ###

import sys
input = sys.stdin.readline
h,w=map(int,input().split())
A=[[False]*(w+2) for _ in range(h+2)]
chk,chk2=[],[]
for i in range(h):
  s=input()
  for j in range(w):
    A[i+1][j+1]=(s[j]==".")
    if s[j]=="#":
      chk.append((i+1,j+1))
ans=0
d=((1,0),(0,1),(-1,0),(0,-1))
while chk:
  for cx,cy in chk:
    for dx, dy in d:
      if A[cx+dx][cy+dy]==True:
        chk2.append((cx+dx,cy+dy))
        A[cx+dx][cy+dy]=False
  if chk2:
    ans+=1
  chk=chk2
  chk2=[]
print(ans)
import sys
from functools import lru_cache


sys.setrecursionlimit(100000)


@lru_cache(maxsize=None)
def rec(n):
    if n == 0:
        return 0
    res = n
    i = 1
    while i <= n:
        res = min(res, rec(n - i) + 1)
        i *= 6
    i = 9
    while i <= n:
        res = min(res, rec(n - i) + 1)
        i *= 9
    return res


N = int(input())
print(rec(N))




### FIXED CODE ###

N = int(input())
dp = [N] * (N + 1)
dp[0] = 0
for i in range(N):
    j = 1
    while i + j <= N:
        dp[i + j] = min(dp[i + j], dp[i] + 1)
        j *= 6
    j = 9
    while i + j <= N:
        dp[i + j] = min(dp[i + j], dp[i] + 1)
        j *= 9
print(dp[-1])
from collections import Counter
from heapq import heappush, heappop
N = int(input())
As = list(map(int, input().split()))
Bs = list(map(int, input().split()))
ctall = Counter(As + Bs)
mcvalue, mccount = ctall.most_common(1)[0]

if mccount > N:
    print('No')
    exit()

print('Yes')
ctA = Counter(As)
ctB = Counter(Bs)

q = []
for k, v in ctA.items():
    if ctB[k] > 0:
        heappush(q, [-(ctA[k]+ctB[k]), k])
onlyBs = []
for k, v in ctB.items():
    if ctA[k] == 0:
        onlyBs += [k] * v

ans = []
for a in As:
    if q:
        ct, k = heappop(q)
        if a == k:
            while q:
                ct2, k2 = heappop(q)
                if ctB[k2] > 0:
                    ctB[k2] -= 1
                    ans.append(k2)
                    if ctB[k2] > 0:
                        heappush(q, [ct2+1, k2])
                    break
            else:
                ans.append(onlyBs.pop())
            heappush(q, [ct+1, k])
        else:
            if ctB[k] > 0:
                ctB[k] -= 1
                ans.append(k)
                if ctB[k] > 0:
                    heappush(q, [ct+1, k])
            else:
                while q:
                    ct2, k2 = heappop(q)
                    if ctB[k2] > 0:
                        ctB[k2] -= 1
                        ans.append(k2)
                        if ctB[k2] > 0:
                            heappush(q, [ct2+1, k2])
                        break
                else:
                    ans.append(onlyBs.pop())

    else:
        ans.append(onlyBs.pop())


print(' '.join(map(str, ans)))


### FIXED CODE ###

from collections import Counter
N = int(input())
As = input().split()
Bs = input().split()

allct = Counter(As + Bs)
if allct.most_common(1)[0][1] > N:
    print('No')
    exit()

lastInA = {}
firstInB = {}

for i, a in enumerate(As):
    lastInA[a] = i

for i, b in enumerate(Bs):
    if b not in firstInB:
        firstInB[b] = i

offset = 0
for k, v in lastInA.items():
    if k not in firstInB:
        continue
    tmp = v - firstInB[k] + 1
    offset = offset if offset > tmp else tmp

print('Yes')
print(' '.join(Bs[-offset:] + Bs[:-offset]))
N = input(int)
M = input(int)
if N == M:
    print('Yes')
else:
    print('No')

### FIXED CODE ###

import sys
import socket

hostname = socket.gethostname()

if hostname == 'F451C':
    sys.stdin = open('a1.in')


def read_int_list():
    return list(map(int, input().split()))


def read_str_list():
    return input().split()


def read_int():
    return int(input())


def read_str():
    return input()


def main():
    n, m = read_int_list()
    if n > m:
      res = 'No'
    else:
      res = 'Yes'
    print(res)


main()
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")
A,B = map(int,input().split())
counter = 0
for _ in range(A,B+1):
    str = str(_)
    alist = list(str)
    list_ = []
    long = len(alist)
    for i in range(long-1,-1,-1):
        list_.append(alist[i])
    num = "".join(list_)
    if num == str:
        counter += 1
        continue
    else:
        continue

print(counter)


### FIXED CODE ###

A, B = map(int, input().split())
counter = 0
for num in range(A, B + 1):
    if str(num) == str(num)[::-1]:
        counter += 1

print(counter)
N = int(input())
a = list(map(int, input().split()))
m = 1
ans = 0
 
for i in range(N):
  m *= a[i]
  
  
while m % 2 == 0:
  m /= 2
  ans += 1
    
print(ans)

### FIXED CODE ###

N = int(input())
a = list(map(int, input().split()))
m = 1
ans = 0

for i in range(N):
  while a[i] % 2 == 0:
    a[i] /= 2
    ans += 1
    
print(ans)
import copy

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

mx = 0
for num_out in range(k+1):
	num_ret = k-num_out
	if num_out > n:
		out = copy.deepcopy(v).sort()
		for ret_v in out[:num_ret]:
			if ret_v < 0:
				ret_value += ret_v
			else:
				break
		val = sum(out) - ret_value
		if val > mx:
			mx = val
		continue

	for num_out_l in range(num_out+1):
		num_out_r = num_out - num_out_l
		out = v[:num_out_l] + v[n-num_out_r:]
		out.sort()
		ret_value = 0
		for ret_v in out[:num_ret]:
			if ret_v < 0:
				ret_value += ret_v
			else:
				break
		val = sum(out) - ret_value
		if val > mx:
			mx = val
			
print(mx)


### FIXED CODE ###

import copy

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

mx = 0
for num_out in range(k+1):
	if num_out > n:
		num_out = n
		num_ret = min(k-n, n)
		out = copy.copy(v)
		out.sort()
		ret_value = 0
		for ret_v in out[:num_ret]:
			if ret_v < 0:
				ret_value += ret_v
			else:
				break
		val = sum(out) - ret_value
		if val > mx:
			mx = val
		continue
	
	num_ret = k-num_out
	for num_out_l in range(num_out+1):
		num_out_r = num_out - num_out_l
		out = v[:num_out_l] + v[n-num_out_r:]
		out.sort()
		ret_value = 0
		for ret_v in out[:num_ret]:
			if ret_v < 0:
				ret_value += ret_v
			else:
				break
		val = sum(out) - ret_value
		if val > mx:
			mx = val
			# mx_out = out

print(mx)
# print(mx_out)
n = int(input())
s,t = map(str,input().split())
a = ""
for i in range(n):
    a = a[i]+s[i]+t[i]
print(a)

### FIXED CODE ###

n = int(input())
s,t = map(str,input().split())
a = ''
for i in range(n):
    a = a+s[i]+t[i]
print(a)
s = []
for i in range(5):
    s.apppend(int(input()))
k = int(input())
for i in range(4):
    if s[i+1]-s[i] >k:
        print(":(")
        break
else:
    print("Yay!")

### FIXED CODE ###

s = []
for i in range(5):
    s.append(int(input()))
k = int(input())
for i in range(4):
    if s[i+1]-s[0] >k:
        print(":(")
        break
else:
    print("Yay!")
a8, a10 = input().split(' ')
a8 = int(a8)
a10 = int(a10)
 
value1 = int(a8 / 0.08)
value2 = int(a10 / 0.1)
if int(value1 * 0.1) == a10:
  if value1 > value2:
    print(value1)
  else:
    print(value1)
elif int(value2 * 0.08) == a8:
  if value1 > value2:
    print(value1)
  else:
    print(value1)
else:
  print(-1)

### FIXED CODE ###

s = input()

if 'A' in s and 'B' in s:
  print('Yes')
else:
  print('No')
from scipy.sparse.csgraph import csgraph_from_dense, dijkstra


def inpl():
    return list(map(int, input().split()))


N, X, Y = inpl()

edge = [[-1 for n in range(N)] for i in range(N)]

for i in range(N - 1):
    edge[i][i + 1] = 1
    edge[i + 1][i] = 1
edge[X - 1][Y - 1] = 1
edge[Y - 1][X - 1] = 1

G = csgraph_from_dense(edge, null_value=-1)
ans_dict = {}
for g in dijkstra(G):
    for i in g:
        ans_dict[i] = ans_dict.get(i, 0) + 1

for i in range(1, N):
    print(ans_dict.get(i, 0) // 2)


### FIXED CODE ###

def inpl():
    return list(map(int, input().split()))


N, X, Y = inpl()
X -= 1
Y -= 1
ans = {i: 0 for i in range(N)}
for i in range(N):
    for j in range(i + 1, N):
        c = min(j - i, abs(i - X) + 1 + abs(j - Y), abs(i - Y) + 1 + abs(j - X))
        ans[c] += 1

for i in range(1, N):
    print(ans[i])
import math
n,a,b = map(int,input().split())
mod = 10**9+7
ans = pow(2,n,mod)
def cmb(n, r, mod):
    if ( r<0 or r>n ):
        return 0
    r = min(r, n-r)
    return g1[n] * g2[r] * g2[n-r] % mod

mod = 10**9+7
N = 10**4
g1 = [1, 1]
g2 = [1, 1]
inverse = [0, 1]

for i in range(2, N + 1):
    g1.append( (g1[-1]*i) % mod)
    inverse.append( (-inverse[mod % i] * (mod//i)) % mod)
    g2.append( (g2[-1]*inverse[-1]) % mod)
ans = ans-(cmb(n,a,mod)+cmb(n,b,mod))-1
print(ans)

### FIXED CODE ###

n,a,b = map(int,input().split())
mod = 10**9+7
ans = pow(2,n,mod)
def cmb(n,r,mod):
  if n == r:
    return 1
  p,q = 1,1
  r = min(r,n-r)
  for i in range(r):
    p = p*(n - i)%mod
    q = q*(i + 1)%mod
    Y = pow(q,10**9+5,mod)
  return p*Y%mod
ans = ans - cmb(n,a,mod) - cmb(n,b,mod) - 1
print(ans%mod)
ans=""
n=input()
s=input()
t=input()
for i in range(len(s)):
  ans+=s[i]+t[i]
print(ans)


### FIXED CODE ###

n=int(input())
s,t=input().split()
a=""
for i,j in zip(s,t):a+=i+j
print(a)
S = input()

l = len(S)
MOD = 10**9+7
dp = [[0 for i in range(13)] for j in range(l+1)]
dp[0][0] = 1
for i in range(l):
    if S[i] == '?':
        for j in range(10):
            for k in range(13):
                dp[i+1][(k*10+j)%13] += dp[i][k] % MOD
    else:
        for k in range(13):
            dp[i+1][(k*10+int(S[i-1]))%13] += dp[i][k] % MOD

print(dp[-1][5] % MOD)

### FIXED CODE ###

S = input()

l = len(S)
MOD = 10**9+7
dp = [[0 for i in range(13)] for j in range(l+1)]
dp[0][0] = 1
for i in range(l):
    if S[i] == '?':
        for j in range(10):
            for k in range(13):
                dp[i+1][(k*10+j)%13] += dp[i][k] % MOD
    else:
        for k in range(13):
            dp[i+1][(k*10+int(S[i]))%13] += dp[i][k] % MOD

print(dp[-1][5] % MOD)
N,M=(int(x) for x in input().split())
a=[int(input()) for i in range(M)]

x=[0]*(N+1)
j=0
if len(x)!=0:
    x[0]=1
if len(x) >0:
    if a[0]==1:
        j+=1
    else:
        x[1]=1


for i in range(2,N+1): 
    if i!=a:
        x[i]=x[i-1]+x[i-2]
    else:
        x[i]=0
        j+=1

print(int(x[N]%(1000000007)))

### FIXED CODE ###

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

x=[0]*(N+1)
j=0
if N!=0:
    x[0]=1
if N>1 and M!= 0 and a[0]==1:
    j+=1
else:
    x[1]=1

for i in range(2,N+1): 
    if j==M or i!=a[j]:
        x[i]=x[i-1]+x[i-2]
    else:
        x[i]=0
        j+=1
print(int(x[N]%(1000000007)))
for i in range(N):
    A[i],B[i] = map(int, input().split())  

C = dict(zip(A,B))

c_sorted = sorted(C.items(), key=lambda x:x[0])

ans = 0
cnt = 0

for k,v in dict(c_sorted).items():
    cnt += v
    if (cnt < M):
        ans += k*v
    else:
        ans += (M-cnt+v) * k
        break
print(ans) 

### FIXED CODE ###

N, M = map(int, input().split())
ABs = [tuple(map(int, input().split())) for _ in range(N)]
 
ABs.sort()
 
ans = 0
for A, B in ABs:
    ans += A * min(M, B)
    M -= min(M, B)
print(ans)
s = list(input())
n = len(s)
s_0 = s[:(n-1)//2]
s_1 = s[(n+1)//2:]
if s_0 == s_0[::-1] and s_1 == s_1[::-1] and s == s[::-1]
    print("Yes")
else:
    print("No")

### FIXED CODE ###

s = list(input())
n = len(s)
s_0 = s[:(n-1)//2]
s_1 = s[(n+1)//2:]
if s_0 == s_0[::-1] and s_1 == s_1[::-1] and s == s[::-1]:
    print("Yes")
else:
    print("No")
# -*- coding: utf-8 -*-
s = input()

return s[0:3]

### FIXED CODE ###

# -*- coding: utf-8 -*-
s = input()
print(s[0:3])
# -*- coding: utf-8 -*-
"""
Created on Thu Sep 20 21:40:30 2018
ABC065D
@author: maezawa
i=0...n (0-origin)
"""
import heapq

n = int(input())
a = []
b = []
for i in range(n): # i is a name of the city (0-origin)
    xy = list(map(int, input().split()))
    a.append([i,xy[0]])
    b.append([i,xy[1]])

a.sort(key=lambda x: x[1])
b.sort(key=lambda x: x[1])
#print(a) 
#print(b)

# making adj list
adj = [[] for _ in range(n)]
for i, [j, x] in enumerate(a[:-1]):
    adj[j].append([a[i+1][1]-x, a[i+1][0]])
    adj[a[i+1][0]].append([a[i+1][1]-x, j])
for i, [j, y] in enumerate(b[:-1]):
    adj[j].append([b[i+1][1]-y, b[i+1][0]])
    adj[b[i+1][0]].append([b[i+1][1]-y, j])

#print(adj)
    
# Prim's algorithm
d = [10**10]*n
visited = [False]*n
h = []
s = 0
heapq.heappush(h, [0, s])
cnt = 0
while h:
    cost, node = heapq.heappop(h)
    #if visited[node] != True and cost < d[node]:
    if visited[node] != True:        
        d[node] = cost
        visited[node] = True
        cnt += 1
        if cnt == n:
            break
        for edge in adj[node]:
            if visited[edge[1]] == True:
                continue
            heapq.heappush(h, edge)
            
#print(d)
print(sum(d))
        


### FIXED CODE ###

x, a, b = list(map(int, input().split()))
if -a+b <= 0:
  print('delicious')
elif -a+b <= x:
  print('safe')
else:
  print('dangerous')
N, K = map(int, input().split(' '))
x = list(map(int, input().split(' ')))

x_min = []
for i in range(N):
    if x[i] == 0:
        K -= 1
    if x[i] > 0:
        break

x_min = [0] + x[0:i][::-1]
x_plus = [0] + x[i:]
length_m = len(x_min)
length_p = len(x_plus)
# print(x_min, x_plus)
ans = 2*(x[0]) + x[-1]

for i in range(length_m):
    if (length_p-1) + i < K:
        continue
    if (i+1) > K:
        break
    temp = 2 * abs(x_min[i]) + abs(x_plus[K-i])
#    print(temp)
    ans = min(ans, temp)

for i in range(length_p):
    if (length_m-1) + i < K:
        continue
    if (i+1) > K:
        break
    temp = 2 * abs(x_plus[i]) + abs(x_min[K-1])
#        print(temp)
    ans = min(ans, temp)

print(ans)


### FIXED CODE ###

N, K = map(int, input().split(' '))
x = list(map(int, input().split(' ')))
ans = abs(x[0]) + abs(x[0]-x[0+K-1])

for i in range(N-K+1):
    temp1 = abs(x[i]) + abs(x[i]-x[i+K-1])
    temp2 = abs(x[i+K-1]) + abs(x[i]-x[i+K-1])
    ans = min(ans, temp1, temp2)

print(ans)
d = None
u = set()
r = 'pairwise'
for x in map(int, input().split()):
  d = math.gcd(d or x, x)
  s = set()
  i = 2
  while i * i <= x:
    while x % i == 0:
      if i in u:
        r = 'setwise'
      s.add(i)
      x //= i
    i += 1
  if x > 1:
    if x in u:
      r = 'setwise'
    s.add(x)
  u |= s
print((r, 'not')[d > 1], 'coprime')

### FIXED CODE ###

N = 1000001
 
spf = [*range(N)]
i = 2
while i * i < N:
  if spf[i] == i:
    for j in range(i * i, N, i):
      if spf[j] == j:
        spf[j] = i
  i += 1
  
r = 'pairwise'
n = int(input())
a = [int(x) for x in input().split() if x > '1']
if len(a) > 1:
  u = set()
  i = None
  for x in a:
    s = set()
    while x > 1:
      p = spf[x]
      if p in u:
        r = 'setwise'
      s.add(p)
      x //= p
    u |= s
    if len(a) == n:
      if i is None: i = s
      else: i &= s
  if i:
    r = 'not'
print(r, 'coprime')
a=int(input())
b=[input() for i in range(a)]
c=[AC,WA,TLE,RE]
for value in c:
  print('{0}x{1}'.format(value, b.count(value)))


### FIXED CODE ###

N = int(input())
s = [input() for i in range(N)]
for v in ['AC', 'WA', 'TLE', 'RE']:
  print('{0} x {1}'.format(v, s.count(v)))
h,w,k = map(int,input().split())
s = [input() for i in range(h)]
ans = [[0]*w for i in range(h)]
c = 1
not_cherry = [] #イチゴがない列
ok = False
for i in range(h):
    if '#' in s[i]:
        cherry = 0
        for j in range(w):
            if s[i][j]=='#':
                if cherry==0:
                    ans[i][j] = c
                else:
                    c += 1
                    ans [i][j] = c
                cherry += 1
            else:
                ans [i][j] = c
        c += 1
        ok = False
    else:
        if ok:
            not_cherry[-1] += 1
        else:
            not_cherry.append(1)
        ok = True

i = 0
ind = 0
while i<h:
    if 0 in ans[i]:
        c = not_cherry[ind]
        for l in range(c):
            for j in range(w):
                if i+l<h-1:ans[i+l][j] = ans[i+c][j]
                else:ans[i][j] = ans[i-1][j]
        i+=c
        ind += 1
    else:
        i+=1

for i in ans:
    print(*i)
            




### FIXED CODE ###

h,w,k = map(int,input().split())
s = [input() for i in range(h)]
ans = [[0]*w for i in range(h)]
c = 1
not_cherry = [] #イチゴがない列
ok = False
for i in range(h):
    if '#' in s[i]:
        cherry = 0
        for j in range(w):
            if s[i][j]=='#':
                if cherry==0:
                    ans[i][j] = c
                else:
                    c += 1
                    ans [i][j] = c
                cherry += 1
            else:
                ans[i][j] = c
        c += 1
        ok = False
    else:
        if ok:
            not_cherry[-1] += 1
        else:
            not_cherry.append(1)
        ok = True

i = 0
ind = 0
while i<h:
    if 0 in ans[i]:
        c = not_cherry[ind]
        for l in range(c):
            for j in range(w):
                if i+l<h-1 and i+c<h-1:ans[i+l][j] = ans[i+c][j]
                else:ans[i+l][j] = ans[i+l-1][j]
        i+=c
        ind += 1
    else:
        i+=1

for i in ans:
    print(*i)
import math
a,b,h,m = map(float, input().split())
rot = 5.5 * (60.0*h + m)
rad = ang * math.pi / 180
cal = a ** 2 + b ** 2 - 2 * a * b * math.cos(rad)
ans = math.sqrt(cal)
print(ans)

### FIXED CODE ###

import math
a,b,h,m = map(float, input().split())
rot = 5.5 * (60.0*h + m)
ang = rot%360
rad = ang * math.pi / 180
cal = a ** 2 + b ** 2 - 2 * a * b * math.cos(rad)
ans = math.sqrt(cal)
print(ans)
def distance(p1, p2):
    """returns the distance between p1 and p2

    >>> d = distance((0, 0), (1, 1))
    >>> print("{0:.5f}".format(d))
    1.41421
    """
    (x1, y1) = p1
    (x2, y2) = p2
    return math.sqrt((x2-x1)**2 + (y2-y1)**2)


def run():
    x1, y1, x2, y2 = [float(i) for i in input().split()]

    print("{0:.5f}".format(distance((x1, y1), (x2, y2))))


if __name__ == '__main__':
    run()


### FIXED CODE ###

import math


def distance(p1, p2):
    """returns the distance between p1 and p2

    >>> d = distance((0, 0), (1, 1))
    >>> print("{0:.5f}".format(d))
    1.41421
    """
    (x1, y1) = p1
    (x2, y2) = p2
    return math.sqrt((x2-x1)**2 + (y2-y1)**2)


def run():
    x1, y1, x2, y2 = [float(i) for i in input().split()]

    print(distance((x1, y1), (x2, y2)))


if __name__ == '__main__':
    run()
a, b, c = map(int, input().split())

list_irioha = [a, b, c]
count = 0
if a + b + c == 17:
    for i in list_iroha:
        if i == 5:
            count += 1
            if count == 2:
                print("YES")
                exit()
print("NO")
exit()


### FIXED CODE ###

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

list_iroha = [a, b, c]
count = 0
if a + b + c == 17:
    for i in list_iroha:
        if i == 5:
            count += 1
            if count == 2:
                print("YES")
                exit()
print("NO")
exit()
c = str(intput())
if c == "a" or c == "e" or c == "i" or c == "o" or c == "u" :
  print("vowel")
else :
  print("consonant")

### FIXED CODE ###

c = str(input())
if c == "a" or c == "e" or c == "i" or c == "o" or c == "u" :
  print("vowel")
else :
  print("consonant")