Harryxun/stf_run huggingface dataset:
import sys
import numpy as np
from scipy.sparse.csgraph import shortest_path
from scipy.sparse import csr_matrix
from operator import itemgetter

read = sys.stdin.read
readline = sys.stdin.readline

n, m, s, t, *uvab = map(int, read().split())
u = np.array(uvab[::4], np.int64)
v = np.array(uvab[1::4], np.int64)
a = np.array(uvab[2::4], np.int64)
b = np.array(uvab[3::4], np.int64)

yen_matrix = csr_matrix((a, (u, v)), shape=(n + 1, n + 1))
snuuk_matrix = csr_matrix((b, (u, v)), shape=(n + 1, n + 1))

yen = shortest_path(yen_matrix, directed=False, indices=s)[1:]
snuuk = shortest_path(snuuk_matrix, directed=False, indices=t)[1:]

costs = (yen + snuuk).astype(int)
costs = sorted(zip(range(1, n + 1), costs.tolist()), key=itemgetter(1), reverse=True)

money = 10 ** 15
city, cost = costs.pop()
for i in range(n):
    if city <= i:
        while True:
            city, cost = costs.pop()
            if city > i:
                break
    print(money - cost)


### FIXED CODE ###

import sys
input = sys.stdin.read
sys.setrecursionlimit(10 ** 7)

import numpy as np
from heapq import heappush, heappop

N,M,S,T, *uvab = map(int,input().split())
graph = [[] for _ in range(N+1)]
for u,v,a,b in zip(*[iter(uvab)]*4):
    graph[u].append((v,a,b))
    graph[v].append((u,a,b))

def dijkstra(start, mode):
    INF = 10 ** 15
    dist = [INF] * (N+1)
    dist[start] = 0
    q = [(0,start)]
    while q:
        d,v = heappop(q)
        if dist[v] < d:
            continue
        for w,*a in graph[v]:
            d1 = d + a[mode]
            if dist[w] > d1:
                dist[w] = d1
                heappush(q, (d1,w))
    return dist

d1 = np.array(dijkstra(S,0))
d2 = np.array(dijkstra(T,1))

d1 += d2
answer = 10 ** 15 - np.minimum.accumulate(d1[::-1])[::-1][1:]
print('\n'.join(map(str, answer.tolist())))
str = input()
k = int(input())

substr = []
for i in range(len(str)):
  substr.extend([str[i:j] for j in range(i+1,len(str) + 1)])

substr = list(set(substr))
substr.sort()
print(substr[k-1])

### FIXED CODE ###

str = input()
k = int(input())
 
substr = []
for i in range(len(str)):
  substr.extend([str[i:j] for j in range(i+1,i+6)])
 
substr = list(set(substr))
substr.sort()
print(substr[k-1])
inport sys
fac=[1 for i in range(n+1)]#fac[i]=i!. fac[0]=1
for i in range(n+1):
  fac[i]=fac[i-1]*i

def comb(n,k):
  return fac[n]//fac[k]//fac[n-k]

x,y=map(int,input().split())
if (x+y)%3!=0:
  print(0)
  sys.exit()
n=(x+y)//3
print(comb(n,x-n))

### FIXED CODE ###

import sys
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

x,y=map(int,input().split())
if (x+y)%3!=0:
  print(0)
  sys.exit()
n=(x+y)//3

mod = 10**9+7 #出力の制限
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 )

print(cmb(n,x-n,mod))
a = int(input())
b = int(input())

if ( a * b ) % 2 == 0:
    print("Even")

else:
    print("Odd")


### FIXED CODE ###

a, b = (int(x) for x in input().split())
if a*b%2 == 0:
    print('Even')
else:
    print('Odd')
# input()
# int(input())
# map(int, input().split())
# list(map(int, input().split()))
# list(map(int, list(input()))) # スペースがない数字リストを読み込み
import math
import sys
import bisect
import heapq  # 優先度付きキュー(最小値取り出し)
import collections
from collections import deque
import pprint

inf = 10**18
mod = 10**9+7

n = int(input())
a = list(map(int, input().split()))
a.sort()
b = []
pre = a[0]
if a[0] != a[1]:
    if pre == 1:
        print(1)
        sys.exit()
else:
    if pre == 1:
        print(0)
        sys.exit()
c = collections.Counter(a)
for k,v in c.items():
    if v == 1:
        b.append(k)

judge = [False for i in range(10**6+1)]
for num in b:
    judge[num] = True
for i in range(1,int(math.sqrt(10**6+1))):
    if judge[i] == True:
        for j in range(i*2,10**6+1,i):
            judge[j] = False
ans = 0
for i in range(1,10**6+1):
    if judge[i]:
        ans+=1
print(ans)

### FIXED CODE ###

# input()
# int(input())
# map(int, input().split())
# list(map(int, input().split()))
# list(map(int, list(input()))) # スペースがない数字リストを読み込み
import math
import sys
import bisect
import heapq  # 優先度付きキュー(最小値取り出し)
import collections
from collections import deque
import pprint

inf = 10**18
mod = 10**9+7

n = int(input())
a = list(map(int, input().split()))
a.sort()
if n == 1:
    print(1)
    sys.exit()
if n == 2:
    if a[0] == a[1]:
        print(0)
    elif a[1]%a[0] == 0:
        print(1)
    else:
        print(2)
    sys.exit()

b = []
pre = a[0]
if a[0] != a[1]:
    if pre == 1:
        print(1)
        sys.exit()
else:
    if pre == 1:
        print(0)
        sys.exit()

judge = [False for i in range(10**6+1)]
for num in a:
    judge[num] = True
for i in range(1,(10**6)):
    if judge[i]:
        for j in range(i*2,10**6+1,i):
            judge[j] = False
ans = 0
for i in range(1,10**6+1):
    if judge[i]:
        ans+=1
subans = 0
c = collections.Counter(a)
for k,v in c.items():
    if v > 1 and judge[k]:
        subans+=1
print(ans-subans)
n=input()
if "7" in s:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

n=input()
if "7" in n:
  print("Yes")
else:
  print("No")
import math
a, b = map(int, input().split())
print(a*b//math.gcd(a, b))

### FIXED CODE ###

def gcd(m, n):
    x = max(m, n)
    y = min(m, n)
    if x%y==0:
        return y
    else:
        return gcd(y, x%y)
        
a, b = map(int, input().split())
print(a*b//gcd(a, b))
num1, num2 = [int(i) for i in input().split()]
num3 = [int(i) for i in input().split()]

numArray = [[0]*2]*num2

for index3 in range(num2):
    numArray[index3] = [int(j) for j in input().split()]


for index1 in range(num1):
     for index2 in range(numArray[index1][0]):
         num3.append(numArray[index1][1])
         if index2 >= num2:
             break

num3.sort(reverse=True)

sum1 = 0

for index2 in range(num1):
    sum1 += num3[index2]

print(sum(num3))

### FIXED CODE ###

num1, num2 = [int(i) for i in input().split()]
num3 = [int(i) for i in input().split()]

numArray = [[0]*2]*num2

for index3 in range(num2):
    numArray[index3] = [int(j) for j in input().split()]

numArray.sort(key=lambda x:(-x[1]))

fg1 = True

for index1 in range(num2):
    for index2 in range(numArray[index1][0]):
        num3.append(numArray[index1][1])
        if len(num3)>=(num1*2):
            fg1= False
            break
    if fg1 == False:
        break

num3.sort(reverse=True)

sum1 = 0
for index4 in range(num1):
    sum1 +=num3[index4]

print(str(sum1))
import sys
import numpy as np

#from fractions import gcd

sys.setrecursionlimit(10 ** 9)

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

K = int(input())

ans = 0
M = np.zeros(K+1, dtype=int)
for i in range(1,K+1):
    for j in range(1,K+1):
        M[j] =  gcd(i,j)
        
        for k in range(1,K+1):
            ans += gcd(M[j],k)
            ans += gcd(gcd(i,j),k)

print(ans)

### FIXED CODE ###

import sys
import numpy as np

sys.setrecursionlimit(10 ** 9)

K = int(input())
mod = 10**9 + 7

N = 3

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

ans = 0

M = np.zeros(K+1, dtype=int)

for i in range(K, 0, -1):
#    print(i)
    M[i] += pow(K//i, N)
    
    for j in range(2,K//i+1):
        j *= i
        M[i] -= M[j]
    
    ans += M[i] * i
    
        
print(ans)
mod=0
N=int(input())
a=list(range(1,N+1))
a.remove(1)
a.append(1)
#print(a)
b=list(range(1,N+1))
#print(b)
for i in range(N):
    mod=mod+(b[i]%a[i])
print(mod)

### FIXED CODE ###

N=int(input())
mod=N*(N-1)//2
print(mod)
import sys
inputs = sys.stdin.readlines()

n = int(inputs[0])
S = inputs[1:]

d = defaultdict(lambda: -1)
for i in range(n):
    s = ''.join(sorted(list(S[i])))
    d[s] += 1

ans = 0
for v in d.values():
    ans += v*(v+1)//2
print(ans)

### FIXED CODE ###

import sys
from collections import defaultdict
inputs = sys.stdin.readlines()

n = int(inputs[0])
S = inputs[1:]

d = defaultdict(lambda: -1)
for i in range(n):
    s = ''.join(sorted(list(S[i].rstrip())))
    d[s] += 1

ans = 0
for v in d.values():
    ans += v*(v+1)//2
print(ans)
"""
xi,xjのペアにおいて、このペアは何通り出てくるか
sum(全通り)sum(i)sum(j){|xi-xj|+|yi-yj|}
和なので、どんな順序でもいい

sum(i)sum(j)sum(全通り){|xi-xj|}
sum(i)sum(j)sum(全通り){|yi-yj|}

あるi,jで固定して、sum(全通り){|xi-xj|}を求めるヤツ
固定したi,jが現れる回数は、

pat = NM-2_C_K-2 こいつはどこでも一緒

pat*sum(i)sum(j){|xi-xj|}を計算する
すべてのi,j(i>j)ペアにおいて、xi,xjの和は
sum(i=1,N){i*(N-i)}
"""
from math import factorial

N,M,K = map(int,input().split())
mod = 10**9+7
fa = 1
num = N*M - 2
# 固定したときの通り数
cut = min(K-2, N*M-K)]
# このfor文は少ないほうが良い
for i in range(num,1,-1):
    if num-i == cut:
        break
    fa *= i
pat = fa//factorial(cut)

# print(pat)
# xi-xj
n_x = M**2*((N-1)*N*(N+1))//6
n_y = N**2*((M-1)*M*(M+1))//6
print(pat*(n_x+n_y)%mod)

### FIXED CODE ###


"""
xi,xjのペアにおいて、このペアは何通り出てくるか
sum(全通り)sum(i)sum(j){|xi-xj|+|yi-yj|}
和なので、どんな順序でもいい

sum(i)sum(j)sum(全通り){|xi-xj|}
sum(i)sum(j)sum(全通り){|yi-yj|}

あるi,jで固定して、sum(全通り){|xi-xj|}を求めるヤツ
固定したi,jが現れる回数は、

pat = NM-2_C_K-2 こいつはどこでも一緒

pat*sum(i)sum(j){|xi-xj|}を計算する
すべてのi,j(i>j)ペアにおいて、xi,xjの和は
sum(i=1,N){i*(N-i)}
"""
from math import factorial

N,M,K = map(int,input().split())
mod = 10**9+7
fa = 1
num = N*M - 2
# 固定したときの通り数
# フェルマーの小定理をつかって、mod(M)でのcombinationが高速で求まる
# http://keita-matsushita.hatenablog.com/entry/2016/12/05/184011
def mod_combination(n,r,mod):
    if n<0 or r<0 or n<r:
        return 0
    if n==0 or r == 0:
        return 1
    a = factorial(n) % mod
    b = factorial(r) % mod
    c = factorial(n-r) % mod
    return (a*pow(b,mod-2,mod)*pow(c,mod-2,mod)) % mod 

pat = mod_combination(N*M-2,K-2,mod)

n_x = M**2*((N-1)*N*(N+1))//6
n_y = N**2*((M-1)*M*(M+1))//6
print(pat*(n_x+n_y)%mod)
l, r = map(int, input().split())
# 2019 = 3 * 673

rr = min(r, l + 2020)

res = 1000000
for i in range(l, rr+1):
    for j in range(l + 1, rr + 1):
        #print("{0}, {1}".format(i, j))
        if i >= j:
            #print("skip")
            continue

        if res > i*j % 2019:
            #print("{0}, {1}".format(i, j))
            res = i*j % 2019
print(res)

### FIXED CODE ###

n,a ,b = map(int, input().split())
s = a * n
print(min(s,b))
A,B=input()
coin=0
for i in range(0,2):
    pre=max(A,B)
    coin+=pre
    if(pre==A):
        A-=1
    else:
        b-=1

### FIXED CODE ###

a,b=input().split()
a=int(a)
b=int(b)
sum=0
for i in range(1,3):
    sum += max(a,b)
    if (sum == a ):
        a -=1
    elif (sum==b):
        b -=1
print(sum)
from logging import *
basicConfig(level=DEBUG, format='%(levelname)s: %(message)s')
disable(CRITICAL)

n = int(input())
# X = [int(x) for x in input()]
X = input()
debug('n {}'.format(n))
debug('X {}'.format(X))
po = X.count('1')
ro = 0
rp = 0
rm = 0
for x in X:
    ro = (ro*2 + int(x)) % (po)
    rp = (rp*2 + int(x)) % (po+1)
    rm = (rm*2 + int(x)) % (po-1)

b = [0]*(n) # 2^i
bp = [0]*(n) # 2^i % (po+1)
bm = [0]*(n) # 2^i % (po-1)
b[n-1] = 1 % (po)
bp[n-1] = 1 % (po+1)
bm[n-1] = 1 % (po-1)
for i in range(n-1,0,-1):
    # debug('i {}'.format(i))
    b[i-1] = b[i]*2%(po)
    bp[i-1] = bp[i]*2%(po+1)
    bm[i-1] = bm[i]*2%(po-1)

debug('po {}'.format(po))
debug('ro {}'.format(ro))
debug('rp {}'.format(ro))
debug('rm {}'.format(ro))
debug('b {}'.format(b))
debug('bp {}'.format(bp))
debug('bm {}'.format(bm))
debug('===')

def popcount(x):
    c = 0
    while x > 0:
        if x & 1: c += 1
        x //= 2
    return c

def f(x):
    if x==0: return 0
    return f(x % popcount(x)) + 1

for i in range(n):
    if X[i] == '0':
        ri = (rp + bp[i]) % (po+1)
    else: # '1'
        ri = (rm - bm[i]) % (po-1)
    debug('ri {}'.format(ri))
    c = f(ri) + 1
    debug('c {}'.format(c))
    print(c)



### FIXED CODE ###

from logging import *
basicConfig(level=DEBUG, format='%(levelname)s: %(message)s')
disable(CRITICAL)

n = int(input())
X = input()
debug('n {}'.format(n))
debug('X {}'.format(X))
po = X.count('1')

# if po == 0:
#     print(0)
#     exit()

pp = po + 1
pm = max(1, po - 1)

rp = 0
rm = 0
for x in X:
    rp = (rp*2 + int(x)) % pp
    rm = (rm*2 + int(x)) % pm

bp = [0]*(n) # 2^i % (po+1)
bm = [0]*(n) # 2^i % (po-1)
bp[n-1] = 1 % pp
bm[n-1] = 1 % pm
for i in range(n-1,0,-1):
    bp[i-1] = bp[i]*2 % pp
    bm[i-1] = bm[i]*2 % pm

debug('po {}'.format(po))
debug('pp {}'.format(pp))
debug('pm {}'.format(pm))
debug('rp {}'.format(rp))
debug('rm {}'.format(rm))
debug('bp {}'.format(bp))
debug('bm {}'.format(bm))
debug('===')

def popcount(x):
    c = 0
    while x > 0:
        if x & 1: c += 1
        x //= 2
    return c

def f(x):
    if x==0: return 0
    return f(x % popcount(x)) + 1

for i in range(n):
    if X[i] == '0':
        ri = (rp + bp[i]) % pp
    else: # '1'
        if po-1 != 0: ri = (rm - bm[i]) % pm
        else:
            print(0)
            continue
    debug('i {} ri {}'.format(i,ri))
    c = f(ri) + 1
    debug('c {}'.format(c))
    print(c)
top = input()
count = 0
for i in len(str(top)):
  if top[i] == 'o':
    count += 1

print(count)

### FIXED CODE ###

top = input()
count = 0
for i in range(len(top)):
  if top[i] == 'o':
    count += 1

sum = 700 + count*100
print(sum)
n = int(input())
if n%9 = 0:
    print("Yes")
else:
    print("No")



### FIXED CODE ###

n = int(input())
if n%9 == 0:
    print("Yes")
else:
    print("No")
#二部グラフになっている時の色の塗り分けを聞いている
n=int(input())
es=[[] for i in range(n)]
for i in range(n-1):
  u,v,w=list(map(int,input().split()))
  es[u-1].append([v,w])
  es[v-1].append([u,w])
  
colors=[0 for i in range(n)]
#深さ優先探索　頂点vをcolorで塗ることを考える
def dfs(v,color):
  colors[v-1]=color
  for i in es[v-1]:
    if i[1]%2==0 and colors[i[0]-1]==0:
      colors[i[0]-1]=color
      return dfs(i[0],color)
    elif i[1]%2==1 and colors[i[0]-1]==0:
      colors[i[0]-1]=-color
      return dfs(i[0],(-1)*color)

dfs(1,1)
print(colors)
for i in colors:
  if i==-1:
    print(0)
  else:
    print(1)
    
    
    
      
  


### FIXED CODE ###

# 再帰の深さが1000を超えそうなときはこれをやっておく
import sys
sys.setrecursionlimit(10**7)
#二部グラフになっている時の色の塗り分けを聞いている
n=int(input())
es=[[] for i in range(n)]
for i in range(n-1):
  u,v,w=list(map(int,input().split()))
  es[u-1].append([v,w])
  es[v-1].append([u,w])

colors=[0 for i in range(n)]
#深さ優先探索　頂点vをcolorで塗ることを考える
def dfs(v,color):
  colors[v-1]=color
  for i in es[v-1]:
    if i[1]%2==0 and colors[i[0]-1]==0:
      dfs(i[0],color)
    elif i[1]%2==1 and colors[i[0]-1]==0:
      dfs(i[0],(-1)*color)
  return colors

    
a=dfs(1,-1)
for i in a:
  if i==-1:
    print(0)
  else:
    print(1)
A=int(input())
B=int(input())
C=int(input())
x=int(input())
s=0
for i in range(A+1):
  if x=0: break
  else:
    for t in range(B+1):
    if x=0: break
    elif 50*C>=x:
      s+=1
      x-=100
    else: x-=100
  x-=500
print(s) 

### FIXED CODE ###

A=int(input())
B=int(input())
C=int(input())
X=int(input())
s=0
for i in range(A+1):
  x=X-500*i
  if x<0: break
  for t in range(B+1):
    if x<0: break
    elif 50*C>=x:
      s+=1
      x-=100
    else: x-=100
print(s)
if __name__ == '__main__':
    x, a, b = int(input())
    if abs(x-a) < abs(x-b):
        print('A')
    else:
        print('B')

### FIXED CODE ###

if __name__ == '__main__':
    x, a, b = map(int, input().split())
    if abs(x-a) < abs(x-b):
        print('A')
    else:
        print('B')
n, k = map(int, input().split())
ans = [0] * (k + 2)
S = 0

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 #出力の制限


for i in range(1, k+1):
    if i > n - k + 1:
        print(0)
    else:
        ans[i] = cmb( (k-1), (i-1) , mod ) * ( cmb( (n-k+i), (n-k) , mod) - S )
        S += ans[i] 
        if ans[i] < 0:
            ans[i] + mod
        print(ans[i])

### FIXED CODE ###

n, k = map(int, input().split())
ans = [0] * (k + 2)
S = 0

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 )


for i in range(1, k+1):
    if i > n - k + 1:
        print(0)
    else:
        ans[i] = cmb( (k-1), (i-1) , mod ) * cmb( (n - k + 1), (i) , mod ) % mod
        if ans[i] < 0:
            ans[i] + mod
        print(ans[i])
#!/usr/bin/env python3
import math

def main():
    N = int(input())
    A = list(map(int, input().split()))
    L = [0] * (N+1)
    R = [0] * (N+1)
    for i in range(N):
        L[i+1] = math.gcd(L[i], A[i])
        R[N-1-i] = math.gcd(R[N-i], A[N-1-i])
    ans = 0
    for i in range(N):
        ans = max(ans, math.gcd(L[i], R[i+1]))
    print(ans)

if __name__ == "__main__":
    main()


### FIXED CODE ###

#!/usr/bin/env python3
from fractions import gcd

def main():
    N = int(input())
    A = list(map(int, input().split()))
    L = [0] * (N+1)
    R = [0] * (N+1)
    for i in range(N):
        L[i+1] = gcd(L[i], A[i])
        R[N-1-i] = gcd(R[N-i], A[N-1-i])
    ans = 0
    for i in range(N):
        ans = max(ans, gcd(L[i], R[i+1]))
    print(ans)

if __name__ == "__main__":
    main()
#!usr/bin/env python3
from collections import defaultdict, deque
from heapq import heappush, heappop
from itertools import permutations, accumulate
import sys
import math
import bisect
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS():return [list(x) for x in sys.stdin.readline().split()]
def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res
def IR(n):
    return [I() for _ in range(n)]
def LIR(n):
    return [LI() for _ in range(n)]
def SR(n):
    return [S() for _ in range(n)]
def LSR(n):
    return [LS() for _ in range(n)]

sys.setrecursionlimit(1000000)
mod = 1000000007

def solve():
    n = I()
    a = LI()
    b = LI()
    cnt = defaultdict(lambda : 0)
    for i in a:
        cnt[i] += 1
    for i in b:
        if not cnt[i]:
            continue
        cnt[i] += 1
    for i in cnt.values():
        if i > n:
            print("No")
            return
    r = -1
    while 1:
        update = False
        for l in range(n):
            if a[l] == b[l]:
                update = True
                b[l],b[r] = b[r],b[l]
                r -= 1
        if not update:
            break
    print("Yes")
    print(*b)
    return

#Solve
if __name__ == "__main__":
    solve()


### FIXED CODE ###

#!usr/bin/env python3
from collections import defaultdict, deque
from heapq import heappush, heappop
from itertools import permutations, accumulate
import sys
import math
import bisect
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS():return [list(x) for x in sys.stdin.readline().split()]
def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res
def IR(n):
    return [I() for _ in range(n)]
def LIR(n):
    return [LI() for _ in range(n)]
def SR(n):
    return [S() for _ in range(n)]
def LSR(n):
    return [LS() for _ in range(n)]

sys.setrecursionlimit(1000000)
mod = 1000000007

def solve():
    x = I()
    print(1-x)
    return

#Solve
if __name__ == "__main__":
    solve()
import math
a,b,x = map(int, input().split())
def f(a,b,t):
  if t < math.atan(a/b): return a*a*b - a*a*a*math.tan(t)/2
  elif t > math.atan(a/b): return a*b*b*math.tan(math.pi/2-t)/2
  else: return a*a*b/2
  
err = x-f(a,b,math.atan(a/b))
if abs(err) < 1e-6:
  print(math.atan(a/b))
else:
  if err < 0:
    ths = [(math.atan(a/b) - 0)*i/3 for i in range(4)]
  else:
    ths = [(math.pi/2-math.atan(a/b))*i/3 for i in range(4)]

  abs_err = map(abs,[x-f(a,b,th) for th in ths])
  eps = 1e-6
  while min(abs_err) > eps:
    err = [x-f(a,b,th) for th in ths]
    abs_err = list(map(abs,err))
    n_i = err.index(max([e for e in err if e<0]))
    p_i = n_i+1
    ths = [(ths[p_i]-ths[n_i])*i/3+ths[n_i] for i in range(4)]
  print(math.degrees(ths[abs_err.index(min(abs_err))]))

### FIXED CODE ###

from math import tan, pi
a,b,x = map(int, input().split())
eps = 1e-6

def f(a,b,t):
  if pi/2-t<eps: return 0
  if b*tan(pi/2.-t) < a: return b*b*tan(pi/2.-t)/2.*a
  else: return a*a*b - a*a*tan(t)/2.*a
  
th_p, th_n = pi/2, 0.
for i in range(100000):
  th_m = (th_p + th_n)/2.
  err = f(a,b,th_m) - x
  if err**2 < eps**2: break
  elif err < 0: th_p = th_m
  else: th_n = th_m
print(180/pi*th_m)
print(x * x * x)

### FIXED CODE ###

x = int(input())
print(x ** 3)
from fractions import gcd
#from math import gcd
#import numpy as np

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

lcms=[A[0]]
[lcms.append(s*lcms[-1]//gcd(lcms[-1], s)) for s in A]

ans=sum([(lcms[-1]//s) %(1e9+7) for s in A])%(10**9+7)

print(int(ans))

### FIXED CODE ###

from fractions import gcd
#from math import gcd
import numpy as np
import sys
input = sys.stdin.readline
mod = 10**9+7

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

lcm = 1
for s in A:
    lcm = s*lcm//gcd(lcm, s)

ans = lcm*sum([pow(s, mod-2, mod) for s in A]) % mod
#ans = sum([lcm//s % mod for s in A]) % mod

print(int(ans%mod))
def main(input):
  a, b = [int(i) for i in input.split()]
  print(a if a <= b else a-1)

# tests = [
#   '5 5',  # 5
#   '2 1',  # 1
#   '11 30',  # 11
# ]

# for test in tests:
#   main(test)


main(a, b)

### FIXED CODE ###

def main(input):
  a, b = [int(i) for i in input.split()]
  print(a if a <= b else a-1)

# tests = [
#   '5 5',  # 5
#   '2 1',  # 1
#   '11 30',  # 11
# ]

# for test in tests:
#   main(test)

main(input())
n = int(input())
v = list(map(int,input().split()))
v.sort()
ans = a[0]
for i in range(1,n):
    ans = (ans+a[i])/2
pritn(ans)
    

### FIXED CODE ###

n = int(input())
v = list(map(int,input().split()))
v.sort()
ans = v[0]
for i in range(1,n):
    ans = (ans+v[i])/2
print(ans)
n,k=int(input())
s=input()
s[k-1]=s[k-1].lower()
print(*s,sep="")

### FIXED CODE ###

n,k=map(int,input().split())
s=list(input())
s[k-1]=s[k-1].lower()
print(*s,sep="")
def has_duplicates(seq):
    return len(seq) == len(set(seq))

def main():
    n,m = map(int,input().split())
    h = list(map(list,input().split()))

    # h[0].append(int(h[1][0]))
    for i in range(n):
        h[i].append(int(h[i][0]))

    for i in range(m):
        a,b = map(int,input().split())
        h[a-1].append(int(h[b-1][0]))
        h[b-1].append(int(h[a-1][0]))

    cnt = 0

    for i in range(n):
        if max(h[i][1:]) == int(h[i][0]):
            if has_duplicates(h[i][1:]):
                cnt +=1
    print(cnt)
    
if __name__ == "__main__":
    main()


### FIXED CODE ###

def main():
    n,m = map(int,input().split())
    h = list(map(int,input().split()))
    A = [0] * n
    for i in range(m):
        a,b = map(int,input().split())
        A[a-1] = max(A[a-1],h[b-1])
        A[b-1] = max(A[b-1],h[a-1])

    cnt = 0

    for i in range(n):
        if A[i] < h[i]:
            cnt += 1

    print(cnt)
    
if __name__ == "__main__":
    main()
list = input().split()
ans = input[0] * input[1] * input[2]

if ans == 5*5*7:
  Print('YES')
else:
  Print('NO)


### FIXED CODE ###

list1 = input().split()
ans = int(list1[0]) * int(list1[1]) * int(list1[2])
 
if ans == 5*5*7:
  print('YES')
else:
  print('NO')