Harryxun/stf_run huggingface dataset:
n,m=map(int,input())
print(int((n*(n-1)/2 + m*(m-1)*2)))

### FIXED CODE ###

n,m=map(int,input().split())
print(int((n*(n-1)/2 + m*(m-1)/2)))
#標準入力
N = int(input())
S = []
S = [list(map(int, input().split())) for i in range(N)]

ans = 1
i = 0
j = 0
for _ in range(N):
  if i==N:
    break
  try:
    a =(S[i+1][1]-S[i][1])/(S[i+1][0]-S[i][0])
    b = S[i][1]-a*S[i][0]
    for _ in range(N):
      if j == N:
        i = N
        break
      if S[j][1]!=a*S[j][0]+b:
        ans+=1
        break
      else:
        S.remove(S[j])
        N -= 1
      j +=1  
  except:

    for _ in range(N):
      if j == N:
        i = N
        break
      if S[j][0]!=S[i][0]:
        ans+=1
        i = j
        break
      else: 
        S.remove(S[j])
        N -= 1
      j+=1
    
print(ans)



### FIXED CODE ###

from collections import Counter
N = int(input())
xy = [list(map(int, input().split())) for _ in range(N)]
 
counter = Counter(((b1[0] - b2[0], b1[1] - b2[1])for b1 in xy for b2 in xy if b1 != b2))
print(N - (list(counter.most_common())+[(0,0)])[0][1])
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
N = int(input())
xyh = []
for _ in range (N):
    xyh.append([int(x) for x in input().split()])

for Cx in range(101):
    for Cy in range (101):
        for i in range (N):
            ls = []
            x = xyh[i][0]
            y = xyh[i][1]
            h = max(H-abs(x-Cx)-abs(y-Cy),0)
            ls.append([x,y,h])
        
        if set(ls) == set(xyh):
            ans = [Cx,Cy,h]

print(ans.split()) 
        


### FIXED CODE ###

#! /usr/bin/env python3
# -*- coding: utf-8 -*-
N = int(input())
xyh = []
for _ in range (N):
    xyh.append([int(x) for x in input().split()])

count = 0
while True:
    if xyh[count][2] > 0:
        xstd = xyh[count][0]
        ystd = xyh[count][1]
        hstd = xyh[count][2]
        break
    else:
        count += 1

for x in range (101):
    for y in range (101):
        Cx = x
        Cy = y
        H = hstd + abs(xstd-Cx) + abs (ystd - Cy)
        xyhcand = []
        for k in range (N) :
            xi = xyh[k][0]
            yi = xyh[k][1]
            h = max(H-abs(xi-Cx)-abs(yi-Cy),0)
            xyhls = [xi,yi,h]
            xyhcand.append(xyhls)
            xyhls = []
        if sorted(xyh) == sorted(xyhcand):
            ans = " ".join([str(x),str(y),str(H)])
            break
        
print(ans)
import math
r = raw_input()
area = r * r * math.pi
cir = 2 * r * math.pi
print '%f %f' % (area, cir)

### FIXED CODE ###

import math
r = input()
area = r * r * math.pi * 1.0
cir = 2 * r * math.pi * 1.0
print '%f %f' % (area, cir)
a,b = map(int, raw_input().split())

if a > b:
    print "a > b"
if a < b:
    print "a < b"
a==b:
    print "a == b"

### FIXED CODE ###

a,b = map(int,raw_input().split())

if a < b:
    print ("a < b")
elif a > b:
    print ("a > b")
elif a == b:
    print ("a == b")
n = int(input())

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


from functools import lru_cache
import sys
if n == 2:
    print(max(a))
    sys.exit()


@lru_cache(maxsize=100000)
def gcd(x, y):
    while y:
        x, y = y, x % y
    return x


def gcd_list(li):
    if len(li) == 1:
        return li[0]
    g = gcd(li[0], li[1])
    for i in range(2, len(li)):
        g = gcd(g, li[i])
    return g


def gcd_list_2(li):
    g = gcd(li[0], li[1])
    if g == 1:
        return max(gcd_list([li[0]] + li[2:]), gcd_list(li[1:]))
    for i in range(2, n):
        if gcd(g, li[i]) == 1:
            gg = gcd_list(li[i+1:])
            bb = [gcd(li[x], gg) for x in range(i+1)]
            bb.sort()
            return bb[1]
        else:
            g = gcd(g, li[i])
    return g


def max_gcd(a):
    g = gcd_list(a)
    a = [a[i]//g for i in range(n)]
    m = gcd_list_2(a)
    print(g * m)


max_gcd(a)

### FIXED CODE ###


n = int(input())

a = list(map(int, input().split()))
a.sort(reverse=True)


from functools import lru_cache
import sys
if n == 2:
    print(max(a))
    sys.exit()


@lru_cache(maxsize=100000)
def gcd(x, y):
    while y:
        x, y = y, x % y
    return x


def gcd_list(li):
    if len(li) == 1:
        return li[0]
    g = gcd(li[0], li[1])
    for i in range(2, len(li)):
        g = gcd(g, li[i])
    return g


def gcd_list_2(li):
    g = gcd(li[0], li[1])
    if g == 1:
        return max(gcd_list([li[0]] + li[2:]), gcd_list(li[1:]))
    for i in range(2, n):
        if gcd(g, li[i]) == 1:
            if i == n - 1:
                return gcd_list(li[:i])
            gg = gcd_list(li[i+1:])
            bb = [gcd(li[x], gg) for x in range(i+1)]
            bb.sort()
            return bb[1]
        else:
            g = gcd(g, li[i])
    return g


def max_gcd(a):
    g = gcd_list(a)
    a = [a[i]//g for i in range(n)]
    m = gcd_list_2(a)
    print(g * m)


max_gcd(a)
#!/usr/bin/env python3
import sys


def solve(W, H, x, y):
    if x==0:
        ans = W*min(y, H-y)
        print(ans+" 0")
        return
    if y == 0:
        ans = H*min(x, W-x)
        print(ans+" 0")
        return

    s1 = W*min(y, H-y)
    s2 = H*min(x, W-x)
    if y*W > H*x:
        s_ = H**2*x/(2*y)
        s3 = min(H*W - s_, s_)
    else:
        s_ = W**2*y/(2*x)
        s3 = min(H*W - s_, s_)
    ss = [s1, s2, s3]
    ans = str(max(ss))
    if len(list(set(ss))) == len(ss):
        flag = "0"
    else:
        flag = "1"
    print(ans + " " + flag)

    return


# Generated by 1.1.4 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    W = int(next(tokens))  # type: int
    H = int(next(tokens))  # type: int
    x = int(next(tokens))  # type: int
    y = int(next(tokens))  # type: int
    solve(W, H, x, y)

if __name__ == '__main__':
    main()


### FIXED CODE ###

#!/usr/bin/env python3
import sys


def solve(W, H, x, y):
    ans = str(H*W/2)
    if x == 0 or y == 0:
        flag = "0"
    else:
        if x == W/2 and y == H/2:
            flag = "1"
        else:
            flag = "0"
    print(ans + " " + flag)

    return


# Generated by 1.1.4 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word

    tokens = iterate_tokens()
    W = int(next(tokens))  # type: int
    H = int(next(tokens))  # type: int
    x = int(next(tokens))  # type: int
    y = int(next(tokens))  # type: int
    solve(W, H, x, y)


if __name__ == "__main__":
    main()
from collections import deque
n, k = map(int,input().split())
a = list(map(int,input().split()))
mod = 10 ** 9 + 7

p = []
m = []
for i in a:
    if i > 0:p.append(i)
    elif i < 0:p.append(i)

flag = 0
if (k - len(p))%2 == 1:
    flag = 1
    p, m = m, p

p.sort(reverse=True)
m.sort()
double = []
    
for i in range(len(p) - 1):
    if i % 2 == 0:
        temp = p[i] * p[i + 1]
        double.append([temp, 1])
for i in range(len(m) - 1):
    if i % 2 == 0:
        temp = m[i] * m[i + 1]
        double.append([temp, 2])

if p[0] < 0:
    double.sort()
else:
    double.sort(reverse=True)

res = 1
p = deque(p)
m = deque(m)
double = deque(double)
while k:
    if double and k - 2 >= 0:
        temp, ind = double.popleft()
        if ind == 1:
            p.popleft()
            p.popleft()
        else:
            m.popleft()
            m.popleft()
        res = (res * temp) 
        k -= 2
    else:
        if not flag:
            if p:
                res = (res * p.popleft()) 
            else:
                res = (res * m.pop()) 
        else:
            if not m:
                res = (res * p.popleft())
            else:
                temp1 = m.popleft()
                temp2 = p.popleft()
                if temp1 <= -temp2:
                    res = (res * temp1)
                    p.appendleft(temp2)
                else:
                    res = (res * temp2)
                    m.appendleft(temp1)
        k -= 1
        
print(res%mod)

### FIXED CODE ###

from collections import deque
n, k = map(int,input().split())
a = list(map(int,input().split()))
mod = 10 ** 9 + 7

p = []
m = []
for i in a:
    if i >= 0:p.append(i)
    elif i < 0:m.append(i)

p.sort(reverse=True)
m.sort()
res = 1
if n == k:
    for i in a:
        res = (res * i) %mod
    print(res)
    exit()
    
if len(p) == 0 and k % 2 == 1:
    for i in range(k):
        res = (res * m[-(i + 1)]) %mod
    print(res)

else:
    p_ind = 0
    m_ind = 0
    while k:
        if k == 1:
            res = (res * p[p_ind]) % mod
            break
        
        temp = p[p_ind] * p[p_ind + 1] if p_ind + 1 < len(p) else 0
        temp1 = m[m_ind] * m[m_ind + 1] if m_ind + 1 < len(m) else 0
        if temp > temp1:
            res = (res * p[p_ind]) %mod
            p_ind += 1
            k -= 1
        else:
            res = (res * temp1) %mod
            m_ind += 2
            k -= 2
    print(res)
l1 = list(input().split(" "))
l2 = list(input().split(" "))
l1.sort()
if l1 == l2:
    print("Yes")
else:
    print("No")

### FIXED CODE ###

l1 = list(input().split(" "))
a = int(l1[0])
b = int(l1[1])
c = int(l1[2])
if a<b:
    if b<c:
        print("Yes")
    else:
        print("No")
else:
    print("No")
import math

stri = input()
ary = stri.split()
n = int(ary[0])
k = int(ary[1])

ans1 = 1 * (n-k +1 )
ansi = ans1
print(ansi)

for i in range(2,k+1):
    ansi = ansi * (k- i + 1) / ( i - 1 ) *  (n-k - i + 2) / i 
    print(int(ansi % 1000000007))

### FIXED CODE ###

import math
 
stri = input()
ary = stri.split()
n = int(ary[0])
k = int(ary[1])
 
ans1 = 1 * (n-k +1 )
ansi = 0
ansi = int(ans1)
print(ansi)
for i in range(2,k+1):
    ansi = ansi * (k- i + 1) // int( i - 1 ) *  (n-k - i + 2) // int(i) 
    type(ansi)
    print(int(ansi % int(1000000007)))
a, b, c = map(int, input().split())
print("Yes" if a <= c <= b else "No")


### FIXED CODE ###

n = int(input())
arare = set(input().split())
if len(arare) == 3:
    print("Three")
else:
    print("Four")
# -*- coding: utf-8 -*-

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

a = input().split()
num = 0

for i,s in enumerate(a):
  for j,g in enumerate(a):
    sum = 0
    for l,e in enumerate(a):
      if l >= i and l <= j:
        sum += int(e)
    if sum >= int(k):
       num += 1

print(str(num))

### FIXED CODE ###

# -*- coding: utf-8 -*-

x,a = map(int, input().split())
if x<a:
  print("0")
else:
  print("10")
import re
s=str(input())
t=str(input())
t2=replace(s,t[:-1])
if len(t2)==1 and re.sub(r"[a-z]","",t2)=="":
  print("Yes")
else:
  print("No")

### FIXED CODE ###

import re
s=str(input())
t=str(input())
for i in range(len(s)):
 if s[i]!=t[i]:
  print("No")
  exit()
 else:
  pass
if re.sub(r"[a-z]","",t)=="":
  print("Yes")
else:
  print("No")
import math

r = input()
pi_ = round(math.pi,4)
print(2*r*pi_)


### FIXED CODE ###

import math

r = input()
p = int(r)
pi_ = round(math.pi,4)
print(2*p*pi_)
R=input()
0<=R and R<=4208
if R>=1 and R<1200
   print('ABC')
elif R>=1200 and R<2800
   print('ARC')
elif R>=2800 and R<=4208
   print('AGC')

### FIXED CODE ###

R=int(input())
0<=R and R<=4208
if R>=0 and R<1200:
   print('ABC')
elif R>=1200 and R<2800:
   print('ARC')
elif R>=2800 and R<=4208:
   print('AGC')
R=int(input())
    print(float(R*2*3.141))

### FIXED CODE ###

R=int(input())
pai=3.14
print(R*2*pai)
import sys 
N, M = map(int, input().split())
X = list(map(int, input().split()))

X = sorted(X)

anslis = []


if M <= N:
    print(0)
    sys.exit()


    
for i in range(M-1):
    ans = abs(X[i+1] - X[i])
    anslis.append(ans)
    ans = 0

anslis = sorted(anslis)

if N==1:
    print(sum(anslis))
else:
    print(sum(anslis[0:M-N]))

### FIXED CODE ###

T, X = map(int, input().split())
print(T / X)
a=input()
b=list(a)
c=1
x=0
ans={"L":1,"R":0,"U":0,"D":0}
ans2={"L":0,"R":1,"U":0,"D":0}
for i in b:
	if int(c)%2==1:
		x=x+ans[i]
    elif int(c)%2==0:
      	x=x+ans2[i]
    c=c+1
if x>=1:
	print("No")
else:
  	print("yes")

### FIXED CODE ###

a=input()
b=list(a)
c=1
x=0
ans={"L":1,"R":0,"U":0,"D":0}
ans2={"L":0,"R":1,"U":0,"D":0}
for i in b:
    if int(c)%2==1:
        x=x+ans[i]
    elif int(c)%2==0:
        x=x+ans2[i]
    c=c+1
if x>=1:
	print("No")
else:
  	print("Yes")
N = int(input())
M = [[] for _ in range(N)]
for _ in range(N - 1):
    u, v, w = map(int, input().split())
    u -= 1
    v -= 1
    M[u].append([v, w])
    M[v].append([u, w])

V = [0] * N
D = [0] * N
C = [0] * N


def dfs(n, c):
    if V[n] == 1:
        return
    C[n] = c
    V[n] = 1
    for w in M[n]:
        if w[1] % 2 == 0:
            dfs(w[0], c)
        else:
            dfs(w[0], (c + 1) % 2)

dfs(0, 0)
for c in C:
    print(c)


### FIXED CODE ###

import sys

sys.setrecursionlimit(1000000)

N = int(input())
M = [[] for _ in range(N)]
for _ in range(N - 1):
    u, v, w = map(int, input().split())
    u -= 1
    v -= 1
    M[u].append([v, w])
    M[v].append([u, w])

V = [0] * N
D = [0] * N
C = [0] * N


def dfs(n, c):
    if V[n] == 1:
        return
    C[n] = c
    V[n] = 1
    for w in M[n]:
        if w[1] % 2 == 0:
            dfs(w[0], c)
        else:
            dfs(w[0], (c + 1) % 2)

dfs(0, 0)
for c in C:
    print(c)
en = list(map(int,input().split()))
sum = 0
for i in range(2):
	if en[i] == 1:
		sum += 30000
	elif en[i] == 2:
		sum += 20000;
	elif en[i] == 3:
		sum +=10000;
if en[0] ==1 and en[1] == 1:
	sum += 40000
print(sum)

### FIXED CODE ###

en = list(map(int,input().split()))
sum = 0
for i in range(2):
	if en[i] == 1:
		sum += 300000;
	elif en[i] == 2:
		sum += 200000;
	elif en[i] == 3:
		sum +=100000;
if en[0] ==1 and en[1] == 1:
	sum += 400000
print(sum)
n = int(input())
x = [int(input()) for _ in range(n)]
ans = list()
for p in x:
  v_sum = 0
  for i in x:
    v_sum += (p - i)**2
  	ans.append(v_sum)
print(min(ans))


### FIXED CODE ###

n = int(input())
x = list(map(int,input().split()))
ans = list()
for p in range(1,101):
  v_sum = 0
  for i in x:
    v_sum += (p - i)**2
  ans.append(v_sum)
print(min(ans))
A, B, C = int(input())
print(int(A)+int(B)+int(C))

### FIXED CODE ###

A, B, C = input()
print(int(A)+int(B)+int(C))
d,t,s = input().split()

if(t*s>d):
    print('Yes')
else:
    print('No')

### FIXED CODE ###

d,t,s = map(int,input().split())

if(t*s>=d):
    print('Yes')
else:
    print('No')
x = list(map(int, input().split))
for i in x:
    if i == 0:
        print(i)

### FIXED CODE ###

x = list(map(int, input().split()))
if x[0] == 0:
    print(1)
elif x[1] == 0:
    print(2)
elif x[2] == 0:
    print(3)
elif x[3] == 0:
    print(4)
else:
    print(5)
data = [
        [
            [
                0 for r in range(10)
            ] for f in range(3)
        ] for b in range(4)
]

n = int(input())

for s in range(n):
    (b, f, r, v) = [int(i) for i in input().split()]
    data[b - 1][f - 1][r - 1] += v


for b in range(4):
    for f in range(3):
        for r in range(10):
            print('', data[b][f][r], end='')
        print()
    if b < 3:
        print('#' * 20)
    else:
        print()

### FIXED CODE ###

cards = {
        'S': [0 for _ in range(13)],
        'H': [0 for _ in range(13)],
        'C': [0 for _ in range(13)],
        'D': [0 for _ in range(13)],
        }
  
n = int(input())
for _ in range(n):
    (s, r) = input().split()
    r = int(r)
    cards[s][r - 1] = r
  
for s in ('S', 'H', 'C', 'D'):
    for r in range(13):
        if cards[s][r] == 0:
            print( '{0:s} {1:d}'.format(s, r+1))
A, B=map(int,input().split())
print(A*B)

### FIXED CODE ###

A, B=(input().split())
A=int(A)
C=int(B[0])*100+int(B[2])*10+int(B[3])
print(int(A*C//100))
import numpy as np
import math


##get int
first_input = list(map(lambda x:int(x), input().split(" ")))
#second_input = list(map(lambda x:int(x), input().split(" ")))

##get float
#first_input = list(map(lambda x:float(x), input().split(" ")))
#second_input = list(map(lambda x:float(x), input().split(" ")))

##get string
#first_input = input().split(" ")

K = first_input[0]

gcd_sum = 0
for a in range(1,K+1):
    for b in range(1,K+1):
        for c in range(1,K+1):
            gcd_sum = gcd_sum + math.gcd(math.gcd(a,b),c)

print(gcd_sum)


### FIXED CODE ###

#import numpy as np
import math
#from fractions import gcd

def main():

    ##get int
    first_input = list(map(lambda x:int(x), input().split(" ")))
    #second_input = list(map(lambda x:int(x), input().split(" ")))

    ##get float
    #first_input = list(map(lambda x:float(x), input().split(" ")))
    #second_input = list(map(lambda x:float(x), input().split(" ")))

    ##get string
    #first_input = input().split(" ")

    K = first_input[0]

    gcd_sum = 0
    for a in range(1,K+1):
        for b in range(1,K+1):
            for c in range(1,K+1):
                gcd_sum = gcd_sum + math.gcd(math.gcd(a,b),c)

    print(gcd_sum)

if __name__ == '__main__':
    main()
N,M,K=map(int,input().split())
par=[i for i in range(N)]
siz=[1 for i in range(N)]
fri=[0 for i in range(N)]
blo=[0 for i in range(N)]
rank=[0 for i in range(N)]

def find(x):
    if(par[x]==x):
        return x
    else:
        par[x]=find(par[x])
        return par[x]

def union(a,b):
    a=find(a)
    b=find(b)
    if(a==b):
        return 0
    else:
        par[a]=b
        siz[b]+=siz[a]

def size(a):
    return siz[find(a)]

def same(a,b):
    return find(a)==find(b)

for i in range(M):
    A,B=map(int,input().split())
    A,B=A-1,B-1
    union(A,B)
    fri[A]+=1
    fri[B]+=1
for i in range(K):
    C,D=map(int,input().split())
    C,D=C-1,D-1
    if(same(C,D)):
        blo[C]+=1
        blo[D]+=1

ans=[size(i)-fri[i]-blo[i]-1 for i in range(N)]
print(*ans)

### FIXED CODE ###

N,M,K=map(int,input().split())
par=[i for i in range(N)]
siz=[1 for _ in range(N)]
rank=[0 for _ in range(N)]

def find(x):
    if(par[x]==x):
        return x
    else:
        par[x]=find(par[x])
        return par[x]

def union(a,b):
    a=find(a)
    b=find(b)
    if(a==b):
        return 0
    else:
        if rank[a]>rank[b]:
            par[b]=a
            siz[a]+=siz[b]
        else:
            par[a]=b
            siz[b]+=siz[a]
            if rank[a]==rank[b]:
                rank[b]+=1
            

def size(a):
    return siz[find(a)]

def same(a,b):
    return find(a)==find(b)

ans=[0 for i in range(N)]
for _ in range(M):
    A,B=map(int,input().split())
    A,B=A-1,B-1
    union(A,B)
    ans[A]-=1
    ans[B]-=1
for i in range(N):
    ans[i]+=size(i)-1
for _ in range(K):
    C,D=map(int,input().split())
    C,D=C-1,D-1
    if(same(C,D)):
        ans[C]-=1
        ans[D]-=1
        
print(*ans)
w=list(input())
n=len(w)
per=-1
def Z(s):
    m=len(s);z=[0]*m;c=0;f=[1]*m;
    for i in range(1,m):
        if i+z[i-c]<c+z[c]:z[i]=z[i-c]
        else:
            j=max(0,c+z[c]-i)
            while i+j<n and s[j]==s[i+j]:j=j+1
            z[i]=j;c=i
    for p in range(1,m):
        for k in range(2,z[p]//p+2):f[k*p-1]=0
    return f
for j in range(1,n//2+1):
    if n%j==0 and w[:n-j]==w[j:]:t=j;break;
if t==-1:print ('1\n1')
elif t==1:print (n);print (1)
else:
    zl=Z(w)
    w.reverse()
    zr=Z(w)
    cnt=0
    for i in range(0,n-1):
        if zl[i] and zr[n-2-i]:cnt=cnt+1
    print(2);print(cnt);

### FIXED CODE ###

w=list(input())
n=len(w)
t=-1
def Z(s):
    m=len(s);z=[0]*m;c=0;f=[1]*m;
    for i in range(1,m):
        if i+z[i-c]<c+z[c]:z[i]=z[i-c]
        else:
            j=max(0,c+z[c]-i)
            while i+j<n and s[j]==s[i+j]:j=j+1
            z[i]=j;c=i
    for p in range(1,m):
        for k in range(2,z[p]//p+2):f[k*p-1]=0
    return f
for j in range(1,n//2+1):
    if n%j==0 and w[:n-j]==w[j:]:t=j;break;
if t==-1:print ('1\n1')
elif t==1:print (n);print (1)
else:
    zl=Z(w)
    w.reverse()
    zr=Z(w)
    cnt=0
    for i in range(0,n-1):
        if zl[i] and zr[n-2-i]:cnt=cnt+1
    print(2);print(cnt);
#!/usr/bin/env python3

def main():
    N, M = map(int, input().split())
    cd = {}
    FAIL = (10 ** 3) * (10 ** 5) + 1
    for _ in range(M):
        ai, _ = map(int, input().split())
        ci = sum(1 << (int(i) - 1) for i in input().split())
        keys = list(cd.keys())
        for i in keys:
            cd[i | ci] = min(cd.get(i | ci, FAIL), cd[i] + ai)
        cd[ci] = min(cd.get(ci, FAIL), ai)
    print(cd.get((1 << N) - 1, -1))


if __name__ == '__main__':
    main()


### FIXED CODE ###

#!/usr/bin/env python3
from __future__ import division
def main():
    N = int(input())
    print(1 - ((N // 2) / N))


if __name__ == '__main__':
    main()
N = input()
N = N*N*N
print(N)

### FIXED CODE ###

N = int(input())
print(N*N*N)
friend_dic = {}
block_dic = {}
results = {}
N, M, K = map(int, input().split())

for i in range(1, N+1):
    friend_dic[i] = []
    block_dic[i] = []
    results[i] = None

for _ in range(M):
    a, b = map(int, input().split())
    friend_dic[a].append(b)
    friend_dic[b].append(a)

for _ in range(K):
    a, b = map(int, input().split())
    block_dic[a].append(b)
    block_dic[b].append(a)

def dfs(graph, start, cluster):
    cluster.append(start)
    for neighbor in graph[start]:
        if neighbor not in cluster:
            dfs(graph, neighbor, cluster)


result = []
for i in range(1, N+1):
    if results[i] is not None:
        result += results[i]
    else:
        cluster = []
        dfs(friend_dic, i, cluster)
        for v in cluster:
            results[v] = str(len(set(cluster) - set(friend_dic[v]) - set(block_dic[v])) - 1)
        result += results[i]
print(" ".join(result))


### FIXED CODE ###

class UnionFind:
    """
    parents: 各要素の親要素
             要素がrootの場合には　-(そのグループに属する要素数) を格納
    """
    def __init__(self, n):
        self.n = n
        self.parents = [-1] * n

    def find(self, x):
        # xが属するグループのrootを取得
        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 {r: self.members(r) for r in self.roots()}

    def __str__(self):
        return '\n'.join('{}: {}'.format(r, self.members(r)) for r in self.roots())

      
n, m, k = map(int, input().split())

union_find = UnionFind(n)
friends_counter = {i: 0 for i in range(n)}
blocks_counter = {i: 0 for i in range(n)}

for _ in range(m):
    a, b = map(int, input().split())
    union_find.union(a-1, b-1)
    friends_counter[a-1] += 1
    friends_counter[b-1] += 1

for _ in range(k):
    c, d = map(int, input().split())
    if union_find.same(c-1, d-1):
        blocks_counter[c-1] += 1
        blocks_counter[d-1] += 1

result = []
for i in range(n):
    result.append(str(union_find.size(i) - friends_counter[i] - blocks_counter[i] - 1))

print(" ".join(result))
n = int(input())
apple = list(map(int, input().split()))
cat = []
count = 0
for i in range(n - 1):
    if apple[i] <= apple[i + 1]:
        cat.append(apple[i])
    else:
        cat.append(apple[i] - 1)
if cat[-1] >= apple[-1] + 1:
    cat.append(-2)
else:
    cat.append(apple[-1] + 1)
for i in range(n - 1):
    if cat[i] <= cat[i + 1]:
        pass
    else:
        count = 1
        break    
print("Yes" if count == 0 else "No")

### FIXED CODE ###

n = int(input())
apple = list(map(int, input().split()))
apple.reverse()
count = 0
for i in range(n - 1):
    if apple[i] >= apple[i + 1]:
        pass
    elif apple[i] + 1 == apple[i + 1]:
        apple[i + 1] = apple[i + 1] - 1
    else:
        count = 1
        break
print("Yes" if count == 0 else "No")