Harryxun/stf_run huggingface dataset:
import math

a,b,C=map(int,input().split())
C2=math.radians(C)
sin=math.sin(C2)
cos=math.cos(C2)
S = 0.5*a*b*sin
L = a+b+(math.sqrt((a**2+b**2)-(2*a*b*cos)))
H = (a*b*sin/2)(a/2)
print(S)
print(L)
print(H)

### FIXED CODE ###

import math

a,b,C=map(int,input().split())
C2=math.radians(C)
sin=math.sin(C2)
cos=math.cos(C2)
S = 0.5*a*b*sin
L = a+b+(math.sqrt((a**2+b**2)-(2*a*b*cos)))
H = (a*b*sin/2)/(a/2)
print("{0:.8f}".format(S))
print("{0:.8f}".format(L))
print("{0:.8f}".format(H))
N,M=map(int,input().split())
H=list(map(int,input().split()))
tunagari=[[] for i in range(N)]
for i in range(M):
  A,B=map(int,input().split())
  tunagari[A-1]+=[B-1]
  tunagari[B-1]+=[A-1]

nums=[0 for i in range(N)]
t=0
for i in range(N):
  tmpl=tunagari[i]
  mini=min(tmpl)
  if mini<i:
    nums[i]=nums[mini]
    continue
  nums[i]=t
  t+=1
maxn=max(nums)
groups=[[] for i in range(maxn+1)]
print(maxn+1)
for i in range(N):
  groups[nums[i]]+=[i]
ans=0

for i in range(maxn):
  tmpl=groups[i]
  tmpl2=[]
  for i in tmpl:
    tmpl2+=[H[i]]
  n=len(tmpl)
  if n==1:
    ans+=1
  else:
    tmpl2.sort()
    if tmpl2[-1]!=tmpl2[-2]:
      ans+=1

### FIXED CODE ###

S=input()
if S=="ARC":
  print("ABC")
else:
  print("ARC")
import collections
import sys
import numpy as np
import copy
import bisect
from operator import mul
from functools import reduce
import itertools
import math
def cmb(n,r):
    r = min(n-r,r)
    if r == 0: return 1
    over = reduce(mul, range(n, n - r, -1))
    under = reduce(mul, range(1,r + 1))
    return over // under

sys.setrecursionlimit(1000000000)
n = int(input())
a = list(map(int,input().split()))
A = collections.Counter(a)
li = []
number = set(a)
number = list(number)
counter = []
for val in A.values():
    counter.append(val)
counter2 = []
for i in range(len(counter)):
    counter2.append((counter[i]*(counter[i]-1))//2)

for i in range(n):
    s = bisect.bisect_left(number,a[i])
    counter[s]-=1
    counter2[s] = counter2[s] - counter[s]
    ans = sum(counter2)
    counter2[s] = counter2[s] + counter[s]
    counter[s]+=1
    print(ans)
"""
temp = li[:]
for i in range(n):
    temp = li[:]
    ans = 0
    for j in range(len(temp)):
        if a[i] == temp[j][0]:
            temp[j][1] -= 1
            break
    for j in range(len(temp)):
        ans += ((temp[j][1])*(temp[j][1]-1))//2
    for j in range(len(temp)):
        if a[i] == temp[j][0]:
            temp[j][1] += 1
            break
    print(ans)
allans = 
"""

### FIXED CODE ###

import sys
import itertools
sys.setrecursionlimit(1000000000)
from heapq import heapify,heappop,heappush,heappushpop
import math
import collections
MOD = 10**9 + 7

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

#ひとつものぞかず、同じ数のボールをとるのは？
c = collections.Counter(a)
maxa = 0
item = [0 for i in range(max(a))]
for key,value in c.items():
    item[key-1] = value
    maxa += (value)*(value-1)//2
for i in range(len(a)):
    d = (item[a[i]-1])*(item[a[i]-1]-1)//2-(item[a[i]-1]-1)*(item[a[i]-1]-2)//2
    print(maxa-d)
import sys
2 readline = sys.stdin.buffer.readline
3
4 h1, m1, h2, m2, k = map(int, readline().split())
5 print(60 * (h2 - h1) + m2 - m1 - k)

### FIXED CODE ###

h1,m1,h2,m2,k = map(int, input().split())
print( 60* (h2-h1) + m2 - m1 - k )
def typical_stairs():
    n, m = map(int, input().split())
    dangerous = set(int(open(0).read().split()))
    mod = 1000000007
    dp = [0] * (n + 1)
    dp[0] = 1
    if 1 not in dangerous:
        dp[1] = 1
    for i in range(2, n + 1):
        if i not in dangerous:
            dp[i] = dp[i - 2] + dp[i - 1]
    print(dp[-1] % mod)


if __name__ == '__main__':
    typical_stairs()


### FIXED CODE ###

def typical_stairs():
    n, m = map(int, input().split())
    dangerous = set(int(input()) for _ in range(m))
    mod = 1000000007
    dp = [0] * (n + 1)
    dp[0] = 1
    if 1 not in dangerous:
        dp[1] = 1
    for i in range(2, n + 1):
        if i not in dangerous:
            dp[i] = dp[i - 2] + dp[i - 1]
    print(dp[-1] % mod)


if __name__ == '__main__':
    typical_stairs()
s = input()
print(s.replace(7,8))

### FIXED CODE ###

s = input()
print('2018' + s[4:])
N = int(input())
ArR = [int(s) for s in input().split(" ")]

def calculate(n,arr):

    dict = {}

    for ar in arr:
        a1 = ar - 1
        a2 = ar
        a3 = ar + 1

        if dict.get(a1) == None:
            dict.__setitem__(a1,1)
        else:
            dict.__setitem__(a1,dict.get(a1)+1)

        if dict.get(a2) == None:
            dict.__setitem__(a2, 1)
        else:
            dict.__setitem__(a2, dict.get(a2) + 1)

        if dict.get(a3) == None:
            dict.__setitem__(a3, 1)
        else:
            dict.__setitem__(a3, dict.get(a3) + 1)


    print(max(dict.values()))
calculate(N,ARR)

### FIXED CODE ###

N = int(input())
ARR = [int(s) for s in input().split(" ")]

def calculate(n,arr):

    dict = {}

    for ar in arr:
        a1 = ar - 1
        a2 = ar
        a3 = ar + 1

        if dict.get(a1) == None:
            dict.__setitem__(a1,1)
        else:
            dict.__setitem__(a1,dict.get(a1)+1)

        if dict.get(a2) == None:
            dict.__setitem__(a2, 1)
        else:
            dict.__setitem__(a2, dict.get(a2) + 1)

        if dict.get(a3) == None:
            dict.__setitem__(a3, 1)
        else:
            dict.__setitem__(a3, dict.get(a3) + 1)


    print(max(dict.values()))
calculate(N,ARR)
N,M  = map(int,input().split())
AB = [list(map(int,input().split())) for _ in range(M)]

#xの木の根を求める
def root(x,li): 
    if li[x] == x:
        return x
    else:
        li[x] = root(li[x],li)
        return li[x]

#xとyが同じ集合に属するかの判定
def find(x,y,li):
    return root(x,li) == root(y,li)

#xとｙを併合
def union(x,y,li):
    x = root(x,li)
    y = root(y,li)
    if x==y:
        return
    else:
        li[x] = y

li = [i for i in range(N+20)]

for i in range(len(AB)):
    AB[i][0] -= 1
    AB[i][1] -= 1
    union(AB[i][0], AB[i][1], li)

for i in range(N):
    root(i, li)

cnt = [0 for i in range(N+20)]
for i in range(N):
    cnt[li[i]] += 1
print(max(cnt))

### FIXED CODE ###

import sys
sys.setrecursionlimit(200000+10)

N,M  = map(int,input().split())
AB = [list(map(int,input().split())) for _ in range(M)]

class UnionFind():
    # 作りたい要素数nで初期化
    # 使用するインスタンス変数の初期化
    def __init__(self, n):
        self.n = n
        # root[x]<0ならそのノードが根かつその値が木の要素数
        # rootノードでその木の要素数を記録する
        self.root = [-1]*(n+1)
        # 木をくっつける時にアンバランスにならないように調整する
        self.rnk = [0]*(n+1)

    # ノードxのrootノードを見つける
    def Find_Root(self, x):
        if(self.root[x] < 0):
            return x
        else:
            # ここで代入しておくことで、後の繰り返しを避ける
            self.root[x] = self.Find_Root(self.root[x])
            return self.root[x]
    # 木の併合、入力は併合したい各ノード
    def Unite(self, x, y):
        # 入力ノードのrootノードを見つける
        x = self.Find_Root(x)
        y = self.Find_Root(y)
        # すでに同じ木に属していた場合
        if(x == y):
            return 
        # 違う木に属していた場合rnkを見てくっつける方を決める
        elif(self.rnk[x] > self.rnk[y]):
            self.root[x] += self.root[y]
            self.root[y] = x

        else:
            self.root[y] += self.root[x]
            self.root[x] = y
            # rnkが同じ（深さに差がない場合）は1増やす
            if(self.rnk[x] == self.rnk[y]):
                self.rnk[y] += 1
            # ノードxが属する木のサイズを返す
    def Count(self, x):
        return -self.root[self.Find_Root(x)]

UF = UnionFind(N)
li = [i for i in range(N+20)]

for i in range(len(AB)):
    AB[i][0] -= 1
    AB[i][1] -= 1
    UF.Unite(AB[i][0], AB[i][1])

cnt = [UF.Count(i) for i in range(N)]
print(max(cnt))
mod = 10 ** 9 + 7
N = int(input())
A = [int(a) for a in input().split()]

# Nが偶数ならAiは全て奇数、Nが奇数なら Aiは全て偶数でなければならない,なぜなら、2x + Ai = N - 1を満たすxが自然数(非負整数)でなければならないから
# さらに、Nが奇数の時はfor i in range(0, N, 2) において 0が１個、それ以外のiが２個ずつ存在しなければならず(これはAiが全て偶数であることも満たしている)、
# Nが偶数の時はfor i in range(1, N, 2) において 全てのiが２個ずつ存在しなければならない(これはAiがすべて奇数であることも満たしている)
# これを踏まえた上でNが偶数の時は N/2人の位置が決まれば反対側の人の位置も決まり、Nが奇数の時は中央の人は固定として、それ以外 (N-1)/2人の位置が決まれば残りの人は反対側で位置が決まる。それぞれ２通りなので、
# よって
if N % 2 != 0:
    for i in range(0, N, 2):
        if A.count(i) == 2:
            continue
        elif A.count(0) == 1:
            continue
        print(0)
        exit()
    
    #order_count = 1
    #for i in range((N - 1) // 2):
        order_count = 2 ** ((N - 1) // 2) % mod

else:
    for i in range(1, N, 2):
        if A.count(i) != 2:
            print(0)
            exit()
    #order_count = 1
    #for i in range(N // 2):
        order_count = 2 ** (N // 2) % mod

print(order_count)




### FIXED CODE ###

mod = 10 ** 9 + 7
N = int(input())
A = [int(a) for a in input().split()]
A.sort()

if N % 2 != 0:
    if A[0] == 0:
        for i in range(2, N, 2):
            if not (A[i] == i and A[i-1] == i):
                print(0)
                exit()
        order_count = 2 ** ((N - 1) // 2) % mod
    else:
        print(0)
        exit()

else:
    for i in range(1, N, 2):
        if not (A[i] == i and A[i-1] == i):
            print(0)
            exit()
    order_count = 2 ** (N // 2) % mod 

print(order_count)
n=int(input())
s=input().sort()
print(s[n:]+(s-s[n:]))

### FIXED CODE ###

n=int(input())
s=input()
word=""
for i in range(len(s)):
    if ord(s[i])+n>90:
        word+=chr(ord(s[i])+n-26)
    else:
        word+=chr(ord(s[i])+n)
print(word)
def getN():
    return int(input())

def getMN():
    a = input().split()
    b = [int(i) for i in a]
    return b[0],b[1]

def getlist():
    a = input().split()
    b = [int(i) for i in a]
    return b


from collections import deque

n, m = getMN()

parents = [[] for i in range(n+1)]
childs = [[] for i in range(n+1)]

k = m-1+n
for i in range(k):
    p1,p2 = getMN()
    parents[p2].append(p1)
    childs[p1].append(p2)

dst = [0 for i in range(n+1)]

d = deque()
n_root = 0
for i, x in enumerate(parents[1:]):
    if not x:
        n_root = i+1
        break


def bfs(n_cur):
    #print(([v.dst for v in vtxs]))
    #c is pure integer
    #print("n_cur = {}".format(n_cur))
    for c in childs[n_cur]:
        d.append(c)
        #print("c = {}".format(c))
        dst[c] = max(dst[c], dst[n_cur]+1)

    while(d):
        bfs(d.pop())


bfs(n_root)

for plist in parents[1:]:
    if plist:
        cur = -1
        ans = plist[0]
        for p in plist:
            if dst[p] > cur:
                cur = dst[p]
                ans = p
        print(ans)
    else:
        print(0)


### FIXED CODE ###

def getN():
    return int(input())


def getNM():
    return map(int, input().split())


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

n,m = getNM()
children = [[] for i in range(n+2)]
n_in = [0] * (n+1)
par_origin = [0] * (n+1)

#入力の処理
for i in range(n+m-1):
    a,b = getNM()
    children[a].append(b)
    n_in[b] += 1

#根を見つける
for i in range(1,n+m-1):
    if n_in[i]:
        pass
    else:
        root = i
        break

#次数を減らしながら探索
import queue
def bfs(root):
    q = queue.Queue()
    q.put(root)
    while(True):
        try:
            cur = q.get(block=False)
        except:
            break
        for c in children[cur]:
            if n_in[c] == 1:
                par_origin[c] = cur
                q.put(c)
            else:
                n_in[c] -= 1

bfs(root)
for i in range(1, n+1):
    print(par_origin[i])
N = int(input())
flg = False
for a in range(1,3501):
  for b in range(a,3501):
    A = 4*a*b - N*(a+b)
    B = N*a*b
    if B%A==0 and A//B>0:
      c = B//A
      flg = True
      break
  if flg:break
print(a,b,c)

### FIXED CODE ###

N = int(input())
flg = False
for a in range(1,3501):
  for b in range(a,3501):
    A = 4*a*b - N*(a+b)
    B = N*a*b
    if A==B==0:
      c = 1
      flg = True
      break
    elif A!=0 and B%A==0 and B//A>0:
      c = B//A
      flg = True
      break
  if flg:break
print(a,b,c)
class UnionFind:
    def __init__(self, n):
        self.parent = [-1 for _ in range(n)]

    def find(self, s):
        if self.parent[s] < 0:
            return s
        self.parent[s] = self.find(self.parent[s])
        return self.parent[s]

    def union(self, a, b):
        a, b = self.find(a), self.find(b)
        if a == b:
            return
        self.parent[a] += self.parent[b]
        self.parent[b] = a

    def size(self, x):
        return -1 * self.parent[self.find(x)]

n, m = list(map(int, input().split()))
uf = UnionFind(n)
for i in range(m):
    a, b = list(map(int, input().split()))
    uf.union(a - 1, b - 1)
print(max([uf.size(i) for i in range(n)]))



### FIXED CODE ###

import sys
sys.setrecursionlimit(10**9)
 
n, m = map(int, input().split())
 
root = [-1] * n
 
 
def r(x):
    if root[x] < 0:
        return x
    else:
        root[x] = r(root[x])
        return root[x]
 
 
def unite(x, y):
    x = r(x)
    y = r(y)
    if x == y:
        return
    root[x] += root[y]
    root[y] = x
 
 
def size(x):
    return -1 * root[r(x)]
 
 
for i in range(m):
    a, b = map(int, input().split())
    a -= 1
    b -= 1
    unite(a, b)
 
ans = 0
for i in range(n):
    ans = max(ans, size(i))
 
print(ans)
import sys
sys.setrecursionlimit(10**7)
input = sys.stdin.readline
N = int(input())
AB = [tuple(map(int,input().split())) for i in range(N-1)]
es = [[] for i in range(N)]
for a,b in AB:
    a,b = a-1,b-1
    es[a].append(b)
    es[b].append(a)

depth = [-1]*N
depth[0] = 0
def dfs(v,p=-1):
    for to in es[v]:
        if to==p: continue
        depth[to] = depth[v] + 1
        dfs(to,v)
dfs(0)

ptns = [
    [0,1,1,0,2,2],
    [0,1,2,0,2,1],
    [0,2,1,0,1,2],
    [0,2,2,0,1,1],
    [2,0,1,1,0,2],
    [1,0,1,2,0,2],
    [2,0,2,1,0,1],
    [1,0,2,2,0,1],
    [2,2,0,1,1,0],
    [2,1,0,1,2,0],
    [1,2,0,2,1,0],
    [1,1,0,2,2,0]
]
mem = [[[] for _ in range(3)] for _ in range(12)]
for i,d in enumerate(depth):
    for k,ptn in enumerate(ptns):
        mem[k][ptn[d%6]].append(i)

for k in range(12):
    ans = [None] * N
    for i in range(1,N+1):
        if len(mem[k][i%3])==0 and len(mem[k][0])==0:
            break
        if len(mem[k][i%3]):
            j = mem[k][i%3].pop()
        else:
            j = mem[k][0].pop()
        ans[j] = i
    else:
        print(*ans)
        exit()
assert False

### FIXED CODE ###

import sys
sys.setrecursionlimit(10**7)
input = sys.stdin.readline
N = int(input())
AB = [tuple(map(int,input().split())) for i in range(N-1)]
if N==2:
    print(1,2)
    exit()
es = [[] for i in range(N)]
for a,b in AB:
    a,b = a-1,b-1
    es[a].append(b)
    es[b].append(a)

depth = [-1]*N
depth[0] = 0
def dfs(v,p=-1):
    for to in es[v]:
        if to==p: continue
        depth[to] = depth[v] + 1
        dfs(to,v)
dfs(0)

g1 = []
g2 = []
for i,d in enumerate(depth):
    if d%2:
        g2.append(i)
    else:
        g1.append(i)
if len(g1) < len(g2):
    g1,g2 = g2,g1

ans = [None] * N
if len(g2) <= N//3:
    for n in range(1,N+1):
        if n%3==0:
            if g2:
                i = g2.pop()
            else:
                i = g1.pop()
        else:
            i = g1.pop()
        ans[i] = n
else:
    for n in range(1,N+1,3):
        i = g1.pop()
        ans[i] = n
    for n in range(2,N+1,3):
        i = g2.pop()
        ans[i] = n
    for n in range(3,N+1,3):
        if g1:
            i = g1.pop()
        else:
            i = g2.pop()
        ans[i] = n
print(*ans)
print(f"A{input().split()[1][0]}C")

### FIXED CODE ###

print('A' + input().split()[1][0] + 'C')
s = input()
ans = 0
sss = []
for i in range(len(s)):
  for j in range(len(s)):
    a = s[i:i+j+2]
    sss.append(a)
    
sssss = set(sss)
for i in sssss:
  if int(sssss[i]) % 2019 == 0:
    ans += 1
      
      
print(ans)


### FIXED CODE ###

s,l = (input(),2019)
m,a,r = ([1]+[0]*l,0,0)
for i,e in enumerate(s[::-1]):
    a += int(e)*pow(10,i,l)
    r += m[a%l]
    m[a%l] += 1
print(r)
import math
from functools import reduce

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)

N, M = map(int, input().split())
a = list(map(int, input().split()))
half_a = []

for i in a:
    half_a.append(i//2)

half_lcm = lcm_list(half_a)

count = 0
print(-(-(M//half_lcm)//2))


### FIXED CODE ###

#Atcoderではmathではなく，fractionsを使用するため．基本fractions
#a/2が全て同じ数の2の倍数を素因数に持つ必要がある．

import fractions
from functools import reduce

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

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

def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)

def waru2(n):
    count = 0
    while True:
        if n % 2 == 0:
            n //= 2
            count += 1
        else:
            break
    return count

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

half_a = []
waru = []

for i in a:
    half_a.append(i//2)
    waru.append(waru2(i))

if max(waru) == min(waru):
    half_lcm = lcm_list(half_a)
    print(-(-(M//half_lcm)//2))
else:
    print(0)
A=int(input())
B=int(input())
for i in range(1,4):
  if i!=A && i!=B:
    print(i)

### FIXED CODE ###

A=int(input())
B=int(input())
for i in range(1,4):
  if i!=A and i!=B:
    print(i)
N = int(input())
X1 = list(map(int, input().split()))
ans = []
for p in range(min(X1), max(X1)):
    poi = 0
    for i in range(N):
        poi += (X1[i] - p)*(X1[i] - p)
        
    ans.append(int(poi))


print(min(ans))

### FIXED CODE ###

N = int(input())
X1 = list(map(int, input().split()))
ans = []
if N == 1:
    print(0)
    exit()
    
if min(X1) == max(X1):
    print(0)
    exit()
    
for p in range(min(X1), max(X1)):
    num = 0
    for i in range(N):
        num += (X1[i] - p)*(X1[i] - p)
        
    ans.append(int(num))

print(min(ans))
N, M  = map(int,input().split())
As = sorted(list(map(int,input().split())))
di = {}
for i in range(b):
    b, c = map(int,input().split())
    di[c] = di.get(c, 0) + b

keys = list(sorted(di.keys(), reverse=True))
ichi = 0
for i in range(N):
    try:
        if keys[ichi] > As[i]:
            As[i] = keys[ichi]
            di[keys[ichi]] -= 1
        else:
            break
        if di[keys[ichi]] == 0:
            ichi += 1
    except:
        pass
print(sum(a))


### FIXED CODE ###

N, M  = map(int,input().split())
As = sorted(list(map(int,input().split())))
di = {}
for i in range(M):
    b, c = map(int,input().split())
    di[c] = di.get(c, 0) + b

keys = list(sorted(di.keys(), reverse=True))
ichi = 0
for i in range(N):
    try:
        if keys[ichi] > As[i]:
            As[i] = keys[ichi]
            di[keys[ichi]] -= 1
        else:
            break
        if di[keys[ichi]] == 0:
            ichi += 1
    except:
        pass
print(sum(As))
a = int(input())
if a.isupper() = True:
  print("A")
else:
  print("a")

### FIXED CODE ###

a = str(input())
if a.isupper() == True:
  print("A")
else:
  print("a")
a = int(input())
b = int(input())
c = int(input())
d = int(a+b+c)
if d >= 22:
  print('bust')
else:
  print('win')

### FIXED CODE ###

a,b,c = map(int,input().split())
if a+b+c>=22:
  print("bust")
else:
  print("win")
def main()
  a, b, k = map(int, input().split())
  for i in range(k):
    if a > 0:
      a -= 1 
    elif b > 0:
      b -= 1
    else:
      break
  print(str(a) + " " + str(b))
  
if __name__ == "__main__"
  main()

### FIXED CODE ###

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

if a > 0:
    if a > k:
        a -= k
        k = 0
    else:
        k -= a
        a = 0

if b > 0:
    if b > k:
        b -= k
    else:
        b = 0

print(str(a) + " " + str(b))
n = int(input())
h = [ int(_) for _ in input().split() ]

for i in range(0,h-1):
    if h[i] > h[i+1]:
        h[i] = h[i]-1
    print(h)   
        
for i in range(0,h-1):
    if h[j] > h[j+1]:
        print('No')
        exit()
        
print('Yes')

### FIXED CODE ###

# ABC 136 C
n = int(input())
h = [ int(_) for _ in input().split() ]
flag = True

for i in range(len(h)-1, 0, -1):
    if h[i-1] == h[i] +1:
        h[i-1] = h[i-1]-1  
        
for j in range(0,len(h)-1):
    if h[j] > h[j+1]:
        print('No')
        flag = False
        break
        
if flag == True:
    print('Yes')
from math import gcd
k = int(input())
ans = 0
for a in range(1,k+1):
  for b in range(a,k+1):
    ab = gcd(a,b)
    for c in range(c,k+1):
      g = gcd(ab,c)
      if a == b == c:
        ans += g
      elif a!=b!=c!=a:
        ans += g*6
      else:
        ans += g*3
print(ans)


### FIXED CODE ###

from math import gcd
k = int(input())
ans = 0
for a in range(1,k+1):
  for b in range(a,k+1):
    ab = gcd(a,b)
    for c in range(b,k+1):
      g = gcd(ab,c)
      if a == b == c:
        ans += g
      elif a != b !=c != a:
        ans += g*6
      else:
        ans += g*3
print(ans)
import fractions

mod = 1e9 + 7;

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

l = 1
for i in A:
  l = l * i // fractions.gcd(l, i)

sum = 0
for i in A:
  sum += l // i

print(sum % mod)


### FIXED CODE ###

import fractions

mod = 10**9 + 7;

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

l = 1
for i in A:
  l = l * i // fractions.gcd(l, i)

sum = 0
for i in A:
  sum += l // i

print(sum % mod)
#!/usr/bin/env python
# coding: utf-8

def main():
    A, B, C, D, E, F = [int(x) for x in input().split()]
    max_rate = E / (100 + E)
    best_weight, best_suger, best_rate = A*100, 0, 0.0
    for a in range(F//100 +1):
        for b in range((F-a*A)//100 + 1):
            water = (a*A+b*B)*100
            if water > F:
                continue
            for c in range((F-water)//C + 1):
                d = min((F - water - c*C) // D, int((E*water-100*c*C) / (100*D)))
                if d < 0:
                    continue
                suger = c*C + d*D
                if water + suger > F:
                    continue
                if water + suger == 0:
                    rate = 0.0
                else:
                    rate = suger / (water + suger)
                if rate > max_rate:
                    continue
                if rate > best_rate:
                    best_weight = water + suger
                    best_suger = suger
                    best_rate = rate
    print(best_weight, best_suger)

if __name__ == '__main__':
    main()


### FIXED CODE ###

#!/usr/bin/env python
# coding: utf-8


def main():
    n = int(input())
    a = int(input())
    print(n*n-a)

if __name__ == '__main__':
    main()
K = int(input())
X = int(input())

if 500 * K >= X:
    print('Yes')
else:
    print('No')

### FIXED CODE ###

K, X = map(int, input().split(' '))

if 500 * K >= X:
    print("Yes")
else:
    print("No")
s=input()
s.sort()
print(s)

### FIXED CODE ###

s=list(input())
s.sort()
print("YNeos"[not s[0]==s[1]!=s[2]==s[3]::2])
from itertools import accumulate
N,*L = map(int, open(0).read().split())
ls = [0]*N
ml = -1
nr = -1
li = -1
mr = 10**9
nl = -1
ri = -1
length = 0
for i,(a,b) in enumerate(zip(*[iter(L)]*2)):
  ls[i] = a,b
  if ml<a:
    ml = a
    nr = b
    li = i
  if b<mr:
    mr = b
    nl = a
    ri = i
  length = max(length, b-a+1)

ans = max(mr-ml+1,0)+length
if ri!=li:
  a,b = min(li,ri),max(li,ri)
  ls.pop(b)
  ls.pop(a)
  N -= 2
else:
  ls.pop(li)
  N -= 1
ls.sort()
r = list(accumulate((c[1] for c in ls[::-1]), min))[::-1]
l = list(c[0] for c in ls)
ans = max(ans, max(mr-nl+1,0)+max(r[0]-ml+1,0))
for i in range(N-1):
  xl = max(nl,l[i])
  xr = min(nr,r[i+1])
  ans = max(ans, max(mr-xl+1,0)+max(xr-ml+1,0))
xl = max(nl,l[N-1])
ans = max(ans, max(mr-xl+1,0)+nr-ml+1)
print(ans)

### FIXED CODE ###

import sys
from itertools import accumulate
N,*L = map(int, open(0).read().split())
ls = [0]*N
ml = -1
nr = -1
li = -1
mr = 10**9
nl = -1
ri = -1
for i,(a,b) in enumerate(zip(*[iter(L)]*2)):
  ls[i] = a,b
  if ml<a:
    ml = a
    nr = b
    li = i
  if b<mr:
    mr = b
    nl = a
    ri = i

if ri!=li:
  a,b = min(li,ri),max(li,ri)
  ls.pop(b)
  ls.pop(a)
  N -= 2
else:
  ls.pop(li)
  N -= 1
if N==0:
  ans = max(mr-nl+1,0)+max(nr-ml+1,0)
  print(ans)
  sys.exit()
ls.sort()
length = max(c[1]-c[0]+1 for c in ls)
ans = max(mr-ml+1,0)+length
r = list(accumulate((c[1] for c in ls[::-1]), min))[::-1]
l = list(c[0] for c in ls)
ans = max(ans, max(mr-nl+1,0)+max(r[0]-ml+1,0))
for i in range(N-1):
  xl = max(nl,l[i])
  xr = min(nr,r[i+1])
  ans = max(ans, max(mr-xl+1,0)+max(xr-ml+1,0))
xl = max(nl,l[N-1])
ans = max(ans, max(mr-xl+1,0)+nr-ml+1)
print(ans)