Harryxun/stf_run huggingface dataset:
import numpy as nu
import math

a,b,c=input().split()
a=int(a)
b=int(b)
c=int(c)
S=1/2*a*b*nu.sin(c)
L=a+b+math.sqrt(a*a+b*b-2*a*b*nu.cos(c))
H=b*nu.sin(c)
print(S)
print(L)
print(H)

### FIXED CODE ###

import math as m

a,b,c=input().split()
a=int(a)
b=int(b)
c=int(c)
c=m.radians(c)
S=0.5*a*b*m.sin(c)
L=a+b+m.sqrt(a*a+b*b-2*a*b*m.cos(c))
H=b*m.sin(c)
print(S)
print(L)
print(H)
H, A = map(isn’t, input().split())
print((H + A - 1) // A)

### FIXED CODE ###

H, A = map(int, input().split())
print((H + A - 1) // A)
class UnionFind:
    def __init__(self, max_size):
        self.max_size = max_size
        self.dat = [i for i in range(self.max_size)]

    def find(self, vertex):
        if self.dat[vertex] is vertex: return vertex
        self.dat[vertex] = self.find(self.dat[vertex])
        return self.dat[vertex]

    def merge(self, child, parent):
        """
        parentとchildをマージして、parentの所属にする
        :param parent:
        :param child:
        :return:
        """
        self.dat[self.find(child)] = self.dat[self.find(parent)]

    def is_same(self, v, w):
        """
        頂点vと頂点wが同じ集合に所属しているか
        :param v:
        :param w:
        :return:
        """
        return self.find(v) == self.find(w)


n, q = map(int, input().split())
uni = UnionFind(n)
while q > 0:
    q -= 1
    com, x, y = map(int, input().split())
    if com is 0:
        uni.merge(x, y)
    else:
        print(1 if uni.is_same(x, y) else 0)



### FIXED CODE ###

import sys


class UnionFind:
    def __init__(self, max_size):
        self.max_size = max_size
        self.dat = [i for i in range(self.max_size)]

    def find(self, vertex):
        if self.dat[vertex] is vertex: return vertex
        self.dat[vertex] = self.find(self.dat[vertex])
        # print("searching : " + str(vertex))
        return self.dat[vertex]

    def merge(self, child, parent):
        """
        parentとchildをマージして、parentの所属にする
        :param parent:
        :param child:
        :return:
        """
        self.dat[self.find(child)] = self.dat[self.find(parent)]

    def is_same(self, v, w):
        """
        頂点vと頂点wが同じ集合に所属しているか
        :param v:
        :param w:
        :return:
        """
        return self.find(v) == self.find(w)


n, q = map(int, input().split())
uni = UnionFind(n)
sys.setrecursionlimit(114514)
while q > 0:
    q -= 1
    com, x, y = map(int, input().split())
    if com is 0:
        uni.merge(x, y)
    else:
        print(1 if uni.is_same(x, y) else 0)
X=int(input())

for i in range(100):
    for j in range(-100,100):
        ans=pow(i,5)-pow(j,5)
        if ans==X:
            ans_a=i
            ans_b=j

print(ans_a,ans_b)

### FIXED CODE ###

NUM=1000

X=int(input())

flg=False

for i in reversed(range(NUM)):
    for j in range(-1*NUM,NUM):
        res=(i**5)-(j**5)
        if res==X:
            ans_A=i
            ans_B=j
            flg=True
            break
    if flg:
        break

print(ans_A,ans_B)
N = int(input())
k = 0
while k**2 > N:
  ans = k**2
  k += 1
print(ans)

### FIXED CODE ###

N = int(input())
k = 0
while 1:
  if 2**k > N:
    break
  ans = 2**k
  k += 1
print(ans)
√çS = str(input())
if S == 'AAA' or S=='BBB':
    print('No')
else:
    print('Yes')

### FIXED CODE ###

S = str(input())
if S == 'AAA' or S=='BBB':
    print('No')
else:
    print('Yes')
import sympy

n = int(input())
cnt = 0
for i in range(1, n+1, 2):
    if len(sympy.divisors(i)) == 8:
        cnt += 1
print(cnt)

### FIXED CODE ###

def make_divisors(n):
    lower, upper = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower.append(i)
            if i != n // i:
                upper.append(n//i)
        i += 1
    return lower + upper[::-1]

cnt = 0
for i in range(1, int(input())+1, 2):
    if len(make_divisors(i)) == 8:
        cnt += 1
print(cnt)
S = input()

if S <= 2019/04/30:
  print("Heisei")
else:
  print("TBD")

### FIXED CODE ###

S = input()
 
if S <= "2019/04/30":
  print("Heisei")
else:
  print("TBD")
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

import numpy as np

def abc166_e():
    N = int(readline())
    A = np.array(readline().split(), dtype=np.int64)

    # indexの差の絶対値
    idx = np.arange(1, N+1, dtype=np.int64) - np.arange(1, N+1, dtype=np.int64).reshape(-1, 1)
    np.absolute(idx, out=idx)
    # 値の和
    valsum = A + A.reshape(-1, 1)

    # 差をとって0なら等しい
    diff = idx - valsum
    ans = N*N - np.count_nonzero(diff)
    ans //= 2  # 同じ組合せが2回数えられているので半分にする
    print(ans)

abc166_e()

### FIXED CODE ###

# https://atcoder.jp/contests/abc166/submissions/12754173

def abc166_e():
    _ = int(input())
    A = list(map(int, input().split()))
    ans = 0
    from collections import defaultdict
    d = defaultdict(int)
    for i, x in enumerate(A, 1):
        ans += d[i - x]
        d[x + i] += 1
    print(ans)

abc166_e()
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces

n = ni()
word = input()
li = [word]
end = word[-1]
ans = 'Yes'
for i in range(n):
    word = input()
    if word[0] != end or word in li:
        ans = 'No'
        break
    end = word[-1]
    li.append(word)
print(ans)

### FIXED CODE ###

import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces

n = ni()
word = input()
li = [word]
end = word[-1]
ans = 'Yes'
for i in range(n-1):
    word = input()
    if word[0] != end or word in li:
        ans = 'No'
        break
    end = word[-1]
    li.append(word)
print(ans)
N, M = map(int, input().split())

G = []
lookup_tab = {}

AB = [list(sorted((map(int, input().split())))) for _ in range(M)]
AB.sort()
for a, b in AB:
    if a not in lookup_tab and b not in lookup_tab:
        G.append({a, b})
        lookup_tab[a] = len(G) - 1
        lookup_tab[b] = len(G) - 1
    elif a in lookup_tab and b not in lookup_tab:
        gid = lookup_tab[a]
        lookup_tab[b] = gid
        G[gid].add(b)
    elif b in lookup_tab and a not in lookup_tab:
        gid = lookup_tab[b]
        lookup_tab[a] = gid
        G[gid].add(a)
    else:
        assert(lookup_tab[a] == lookup_tab[b])
        continue

if G:
    print(max([len(g) for g in G]))
else:
    print(1)


### FIXED CODE ###

class UnionFind:

    def __init__(self, n):
        self.n = n
        self.parents = [-1] * n

    def find(self, x):
        if self.parents[x] < 0:
            return x
        else:
            self.parents[x] = self.find(self.parents[x])
            return self.parents[x]

    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)

        if x == y:
            return

        if self.parents[x] > self.parents[y]:
            x, y = y, x

        self.parents[x] += self.parents[y]
        self.parents[y] = x

    def size(self, x):
        return -self.parents[self.find(x)]

    def same(self, x, y):
        return self.find(x) == self.find(y)

    def members(self, x):
        root = self.find(x)
        return [i for i in range(self.n) if self.find(i) == root]

    def roots(self):
        return [i for i, x in enumerate(self.parents) if x < 0]

    def group_count(self):
        return len(self.roots())

    def all_group_members(self):
        return {root: self.members(root) for root in self.roots()}

    def __str__(self):
        return '\n'.join(f'{root}: {self.members(root)}' for root in self.roots())


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

uf = UnionFind(N)
for _ in range(M):
    a, b = map(int, input().split())
    uf.union(a - 1, b - 1)

print(max(uf.size(i) for i in range(N)))
a=int(input())
b=int(input())
sum=0
if a >= b:
    sum += a
    a -= 1
    if a >= b:
        sum += a
    else:
        sum += b
else:
    sum += b
    if a < b:
        sum += b
    else:
        sum +=a
print(sum)

### FIXED CODE ###

a, b = map(int, input().split())
sum=0
if a >= b:
    sum += a
    a -= 1
    if a >= b:
        sum += a
    else:
        sum += b
else:
    sum += b
    b -=1
    if a < b:
        sum += b
    else:
        sum +=a
print(sum)
S=input()
T=input()

count=0

for i in range(len(S)+1):
    if S[i]!=T[i]:
        count +=1
    print(T[i])
print(count)

### FIXED CODE ###

S=input()
T=input()

count=0

for i in range(len(S)):
    if S[i]!=T[i]:
        count +=1
print(count)
import math
from itertools import accumulate

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

fromright = list(accumulate(a, math.gcd))
a.reverse()
fromleft = list(accumulate(a, math.gcd))
fromleft.reverse()

gcd = []

for i in range(1, n-1):
  gcd.append(math.gcd(fromright[i-1], fromleft[i+1]))

print(max(gcd))

### FIXED CODE ###

import math
from itertools import accumulate

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

fromright = list(accumulate(a, math.gcd))
a.reverse()
fromleft = list(accumulate(a, math.gcd))
fromleft.reverse()

gcd = []

gcd.append(fromleft[1])

for i in range(1, n-1):
  gcd.append(math.gcd(fromright[i-1], fromleft[i+1]))

gcd.append(fromright[n-2])

if n == 2:
  print(max(a))
else:
  print(max(gcd))
s=raw_input()
s=s.split()
if x<=k*500;
 a="Yes"
else;
 a="No"
print(a)

### FIXED CODE ###

s=raw_input()
s=s.split()
s[0]=int(s[0])
s[1]=int(s[1])
if s[1]<=s[0]*500:
 a="Yes"
else:
 a="No"
print(a)
import heapq
from collections import defaultdict, deque
from math import ceil, factorial, gcd
from itertools import accumulate
import sys
import bisect


sys.setrecursionlimit(10 ** 7)
INF = float("inf")
MOD = 10 ** 9 + 7

si = lambda: input().strip()
ii = lambda: int(input())
mii = lambda: map(int, input().split())
lmii = lambda: list(map(int, input().split()))
smii = lambda: sorted(map(int, input().split()))

# ----------

N, K = mii()

channels = defaultdict(list)
for i in range(N):
    s, t, c = mii()
    channels[c].append([s, t])

for name, times in channels.items():
    times.sort()
    new = []
    for i, time in enumerate(times):
        s, t = time
        if i == 0:
            new.append([s, t])
            continue
        if s == new[-1][1]:
            new[-1][1] = t
        else:
            new.append([s, t])
    channels[name] = new

timetable = [0] * 100010
for name, times in channels.items():
    for s, t in times:
        timetable[s] += 1
        timetable[t+1] -= 1

acc = accumulate(timetable)

print(max(acc))




### FIXED CODE ###

from collections import defaultdict
from itertools import accumulate


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

timetables = defaultdict(list)
for i in range(N):
    s, t, c = map(int, input().split())
    timetables[c].append([s, t])

for name, times in timetables.items():
    times.sort()
    new = []
    for i, time in enumerate(times):
        s, t = time
        if i == 0:
            new.append([s, t])
            continue
        if s == new[-1][1]:
            new[-1][1] = t
        else:
            new.append([s, t])
    timetables[name] = new

time_count = [0] * 100010
for name, times in timetables.items():
    for s, t in times:
        time_count[s] += 1
        time_count[t + 1] -= 1

acc = accumulate(time_count)

print(max(acc))
import numpy as np

N = int(input())

LR = []
for i in range(N):
  X, L = map(int, input().split())
  LR.append([X-L, 1, i])
  LR.append([X+L, 0, i])

LR.sort()

tree = np.eye(N, dtype=bool)

is_now = np.zeros(N, dtype=bool)
for y, lr, idx in LR:
  if lr == 1:
    is_now[idx] = True
    tree[idx] += is_now
  else:
    is_now[idx] = False

tree += tree.T

a = np.sum(tree)
B = np.argsort(tree.sum(axis=0))[::-1]



### FIXED CODE ###

N = int(input())

RL = []
for i in range(N):
  x, l = map(int, input().split())
  RL.append([x+l, x-l])

RL.sort()
right = -10**9

ans = 0
for r, l in RL:
  if l >= right:
    right = r
    ans += 1
    
print(ans)
a, b = map(int, input().split())
if b == 'H':
  print('H') if a == 'H' else print('D')
else:
  print('D') if a == 'H' else print('H')

### FIXED CODE ###

a, b = input().split()
print('H') if a == b else print('D')
a = list(input())

for i in range(len(a)):
  if a[i] == "A":
    k = i
for i in range(len(a),0,-1):
  if a[i] == "Z":
    kk = i
print(kk-k+1)

### FIXED CODE ###

a = list(input())

for i in range(len(a)):
  if a[i] == "A":
    k = i
    break
for i in range(len(a)-1,0,-1):
  if a[i] == "Z":
    kk = i
    break
print(kk-k+1)
def c_to_infinity(S, K):
    for k, s in enumerate(S, 1):
        if k > K:
            ans = '1'  # K文字目まで1しかなかった
            break
        if s != '1':
            ans = s  # 現れた数字が5000兆回の操作によってK文字目に必ず現れる
            break
    return ans

S = input().strip()
K = int(input())
print(c_to_infinity(S, K))

### FIXED CODE ###

def c_to_infinity(S, K):
    for k, s in enumerate(S,1):
        if s != '1':
            if k > K:
                return '1'
            else:
                return s
    # Sは1のみで構成されていた
    return 1

S = input().strip()
K = int(input())
print(c_to_infinity(S, K))
n=int(input())
l=input().split()
a={}
for i in range(0,len(l),2):
    if l[i] in a:
        a[l[i]]+=1
    else:
        a[l[i]]=1
b={}  
for i in range(1,len(l),2):
    if l[i] in b:
        b[l[i]]+=1
    else:
        b[l[i]]=1
a = sorted(a.items(), key=lambda x:-x[1])
b = sorted(b.items(), key=lambda x:-x[1])
if a[0][0]==b[0][0]:
    m=max(a[0][1]+b[1][1],a[1][1]+b[0][1])
else:
    m=a[0][1]+b[0][1]
print(n-m)

### FIXED CODE ###

n=int(input())
l=input().split()
a={"-1":0}
for i in range(0,len(l),2):
    if l[i] in a:
        a[l[i]]+=1
    else:
        a[l[i]]=1
b={"-1":0}  
for i in range(1,len(l),2):
    if l[i] in b:
        b[l[i]]+=1
    else:
        b[l[i]]=1
a = sorted(a.items(), key=lambda x:-x[1])
b = sorted(b.items(), key=lambda x:-x[1])
if a[0][0]==b[0][0]:
    m=max(a[0][1]+b[1][1],a[1][1]+b[0][1])
else:
    m=a[0][1]+b[0][1]
print(n-m)
n = int(input())
if n % 10 == 0:
  print(10)
else:
  a = str(n)
  b = sum(a)
  print(b)

### FIXED CODE ###

n = int(input())
if n % 10 == 0:
  print(10)
else:
  result = sum(list(map(int, str(n))))
  print(result)
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
A,B=map(int,input().split())
print("Yay!" if a <= 8 and b <= 8 else ":(")

### FIXED CODE ###

A,B=map(int,input().split())
print("Yay!" if A<9 and B<9 else ":(")
N, K = input().split()
l = list(int(i) for i int input().split())
count = 0
 
for i in l:
  if(i > K):
    count = count + 1

print(count)

### FIXED CODE ###

N, K = input().split()
l = list(int(i) for i in input().split())
count = 0
 
for i in l:
  if(i >= int(K)):
    count = count + 1

print(count)
def chmin(a,b):
	if a >= b :
		a = b
		return a
	else:
		return a

n = int(input())
h = list(map(int,input().split()))
dp = [-1]*(n+1)
dp[1] = 0
dp[2] = abs(h[1]-h[0])

for i in range(1,n-1):
	dp[i+2] = my_function.chmin(
		dp[i+1]+abs(h[i+1]-h[i])
		,dp[i]+abs(h[i+1]-h[i-1]))

print(dp[n])

### FIXED CODE ###


def chmin(a,b):
	if a >= b :
		a = b
		return a
	else:
		return a

n = int(input())
h = list(map(int,input().split()))
dp = [-1]*(n+1)
dp[1] = 0
dp[2] = abs(h[1]-h[0])

for i in range(1,n-1):
	dp[i+2] = chmin(
		dp[i+1]+abs(h[i+1]-h[i])
		,dp[i]+abs(h[i+1]-h[i-1]))

print(dp[n])
N = int(input())
S = list(map(int,input().split()))

Ans = "Three"
for s in S:
    if s=="Y":
        Ans = "Four"
        break

print(Ans)

### FIXED CODE ###

N = int(input())
S = list(input().split())
print("Four" if "Y" in S else "Three")
X = int(input())
i = 0
while True:
  tmp1 = pow(X + pow(i, 5), 1/5)
  if tmp1.is_integer():
    print(int(tmp1), i)
    break
  tmp2 = pow(X - pow(i, 5), 1/5)
  if tmp2.is_integer():
    print(int(tmp2), -i)
    break
  else:
    i += 1
          

### FIXED CODE ###

X = int(input())
pin = 0
for i in range(-120, 120):
    if pin == 1:
        break
    for j in range(-120, 120):
        if pow(i, 5) - pow(j, 5) == X :
            pin =1
            print(i, j)
            break
a,b,t = map(int,input().split())
ans = int(b*(t+0.5)/a)
print(c)

### FIXED CODE ###

a,b,t = map(int,input().split())
print(t//a*b)
N = int(input())
A = list(map(int, input().split()))

count = [0]*(max(A) + 1)

for i in range(N):
    if A[i] == 0:
        count[0] += 1
        count[1] += 1
        
    elif A[i] == max(A):
        count[A[i]] += 1
        count[A[i] - 1] += 1
    
    else:
        count[A[i] + 1] += 1
        count[A[i]] += 1
        count[A[i] - 1] += 1

print(max(count))

### FIXED CODE ###

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

maximum = max(A)
count = [0]*(maximum + 2)

for i in range(N):
    if A[i] == 0:
        count[0] += 1
        count[1] += 1
        
    elif A[i] == maximum:
        count[A[i]] += 1
        count[A[i] - 1] += 1
    
    else:
        count[A[i] + 1] += 1
        count[A[i]] += 1
        count[A[i] - 1] += 1

print(max(count))
n = int(input())
d = list(map(int, input()))
s = sum(d)

print(sum(list(map(lambda x:(s-x)*x, d))))

### FIXED CODE ###

n = int(input())
d = list(map(int, input().split()))
s = sum(d)

print(sum(list(map(lambda x:(s-x)*x, d)))//2)
import numpy as np
import copy
N, M, X = map(int, input().split())
C = np.zeros(N, dtype=np.uint16)
A = np.zeros([N, M], dtype=np.uint16)
skills = np.zeros(M, dtype=np.uint16)
sum_skills = np.zeros(M, dtype=np.uint32)
sum_A = np.zeros(N, dtype=np.uint32)

for n in range(N):
    CA = list(map(np.uint16, input().split()))
    C[n] = CA[0]
    A[n] = CA[1:]
    sum_skills += CA[1:]
    sum_A[n] = sum(CA[1:])


def check_skills(skills):
    return np.all(skills >= X)


if np.all(sum_skills >= X):
    pass
else:
    print("-1")
    exit()

results = []
book_sorted = np.argsort(sum_A)
for n in range(M):
    result = ([n], C[n].copy(), A[n].copy())
    results.append(result)

min_cost = np.sum(C)

while len(results) > 0:
    result = results.pop(0)
    if check_skills(result[2]):
        min_cost = min(min_cost, result[1])
    elif result[1] > min_cost:
        continue
    else:
        max_idx = max(result[0])
        for idx in range(max_idx+1, N):
            (idxes, total_cost, skill_values) = copy.copy(result)
            idxes = idxes + [idx]
            total_cost = total_cost + C[idx]
            skill_values = skill_values + A[idx]
            results.append((idxes, total_cost, skill_values))

print(min_cost)


### FIXED CODE ###

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

A = [[] for i in range(N)]
C = [0] * N
for i in range(N):
    c_as = list(map(int, input().split()))
    C[i], A[i] = c_as[0], c_as[1:]

INF = 10**9
ans = INF
for s in range(0, 1 << N):
    smart = [0] * M
    cost_sum = 0
    for i in range(N):
        if (s >> i) % 2 == 0:
            continue
        cost_sum += C[i]
        for j in range(M):
            smart[j] += A[i][j]
    ok = True
    for j in range(M):
        if smart[j] < X:
            ok = False
    if ok:
        ans = min(ans, cost_sum)
if ans == INF:
    ans = -1
print(ans)
N = int(input())
print(int(N**(0.5))

### FIXED CODE ###

N = int(input())
x = int(N**(1/2))
print(x*x)
n,k = list(map(int,input().split()))
if n%k == 0:
    pirnt(0)
else:
    print(1)

### FIXED CODE ###

n,k = list(map(int,input().split()))
if n%k == 0:
    print(0)
else:
    print(1)
import heapq

# 入力の取得(1行目。数値)
i = list(map(int, input().split()))

# 変数セット
# 1.購入する品物の数
itemCount = i[0]
# 2.割引券の数
discountTicketsCount = i[1]

# 入力の取得(2行目。数値)
priceList = list(map(int, input().split()))

# 「符号反転した」リストを優先度付きキューに変換
# ★ポイント★
# heapqは最小値しか取り出せないため、
# 符号反転してからキューに変換=>最小値を取る、という手法を行う。
priceList = [ n * -1 for n in priceList]
heapq.heapify(priceList)

# キューから最小値の取り出し
aaa = heapq.heappop(priceList)
print(aaa)
aaa = heapq.heappop(priceList)
print(aaa)


# 合計金額を出力
# print(sum(priceList))



### FIXED CODE ###

import math
import heapq

# 入力の取得(1行目。数値)
i = list(map(int, input().split()))

# 変数セット
# 1.購入する品物の数
itemCount = i[0]
# 2.割引券の数
discountTicketsCount = i[1]

# 入力の取得(2行目。数値)
priceList = list(map(int, input().split()))

# 「符号反転した」リストを優先度付きキューに変換
# ★ポイント★
# heapqは最小値しか取り出せないため、
# 符号反転してからキューに変換=>最小値を取る、という手法を行う。
priceList = [ n * -1 for n in priceList]
heapq.heapify(priceList)

# 割引件数分ループ
for i in  range(discountTicketsCount):

    # キューから最小値の取り出し(ここで符号反転も行っておく)
    target = abs(heapq.heappop(priceList))

    # 2で割る。(小数点切り下げ)
    target = math.floor(target / 2)

    # 割引券利用後の金額をキューに格納(ここで符号反転する)
    heapq.heappush(priceList, target * -1)

# 合計金額を出力
print(abs(sum(priceList)))
n=input()
t,a=input().split()
b=input().split()
n=int(n)
t=int(t)
a=int(a)
min=1000
for i in range(n):
     diff=abs(a-t+0.006*int(b[i]))
     if min>diff:
          id=i+1
          min=diff
print(id)

### FIXED CODE ###

fare = input().split()
print(int(int(fare[0])+int(fare[1])/2))
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
def s(): return input()
def i(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def X(): return list(input())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 9)
mod = 10**9+7

a = l()
ans = " ".join(a)
for i in range(1,101):
    if ans == i**2:
        print("Yes")
        sys.exit()

print("No")


### FIXED CODE ###

import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
def s(): return input()
def i(): return int(input())
def S(): return input().split()
def X(): return list(input())
def I(): return map(int,input().split())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 9)
mod = 10**9+7

a = L()
b = "".join(a)
b = int(b)
for i in range(1000):
    if b == i**2:
        print("Yes")
        sys.exit()

print("No")
H, W = map(int, input().split())
a = []
for i in range(H):
    a.append(input())
row = [False]*H
col = [False]*W
for i in range(H):
    for j in range(W):
        if a[i][j] == "#":
            row[i] = True
            col[j] = True
for i in range(H):
    if row[i]:
        for j in range(W):
            if col[j]:
                print(a[i][j], end = "")
        print("", end = "\n")


### FIXED CODE ###

N, K = map(int, input().split())
x = [i for i in map(int, input().split())]
i = 0
min_time =5e8
while i < N-K+1:
    if x[i]<0 and x[i+K-1]<0:
        time = -x[i]
    if x[i]<0 and x[i+K-1]>=0:
        time1 = -2*x[i] + x[i+K-1]
        time2 = -x[i] + 2*x[i+K-1]
        if time1< time2:
            time = time1
        else:
            time = time2
    if x[i] >= 0 and x[i+K-1] >=0:
        time = x[i+K-1]
    if time < min_time:
        min_time = time
    i += 1
print(min_time)
n = int(input())
lst = []
for _ in range(n):
  x, y, h = map(int, input().split())
  if h:
  lst.append(x, y, h)
if len(lst) == 1:
  print(*lst)
  quit()
for cx in range(101):
  for cy in range(101):
    a = True
    preh = abs(lst[0][0] - cx) + abs(lst[0][1] - cy) +lst[0][2]
    for x, y, h in lst[1:]:
      H = abs(x - cx) + abs(y - cy) + h
      if H != preh:
        a = False
        break
    if a:
      print(cx, cy, H)
      quit()
    

### FIXED CODE ###

n = int(input())
lst = []
for _ in range(n):
  x, y, h = map(int, input().split())
  if h != 0:
    lst.append([x, y, h])
if len(lst) == 1:
  print(*lst[0])
  quit()
for cx in range(101):
  for cy in range(101):
    a = True
    preh = abs(lst[0][0] - cx) + abs(lst[0][1] - cy) +lst[0][2]
    for x, y, h in lst[1:]:
      H = abs(x - cx) + abs(y - cy) + h
      if H != preh:
        a = False
        break
    if a:
      print(cx, cy, H)
      quit()
a= int(input())
b= int(input())
c= int(input())

if a == b == c:
    print(1)

elif (a==b and b!=c) or (b==c and a!=b) or (a==c and b!=a):
    print(2)

else:
    print(3)




### FIXED CODE ###

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

if a == b == c:
    print(1)

elif (a==b and b!=c) or (b==c and a!=b) or (a==c and b!=a):
    print(2)

else:
    print(3)
n=input()
ans=1
flag=0
for i in n:
  x=input()
  ans*=x
  if(ans>(10**18)):
    flag=1
    break

if(flag):
  print(-1)
else print(ans)

### FIXED CODE ###

n = int(input())
a = list( map (int , input().split() ) )
a.sort()
ans = 1
for i in range(n):
    ans*=a[i]
    if ans>10**18:
      print(-1)
      exit()

print(ans)