Harryxun/stf_run huggingface dataset:
N = int(input())
H = list(map(int, input().split()))

count = 0
diff = 0

if N == 1:
    print("Yes")
    exit(1)

for i in range(0, N-1):
    if H[i] <= H[i+1]:
        continue
    else:
        count += 1
        if diff < H[i+1] - H[i]:
            diff = H[i+1] - H[i]


if count <= 1 and diff <= 1:
    print("yes")
else:
    print("No")


### FIXED CODE ###


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

count = 0
diff = 0

if N == 1:
    print("Yes")
else:
    minn = 1
    tmp = 0
    for i in range (0, N):
        if minn <= H[i] - 1:
            H[i] -= 1
            minn = H[i]
        elif minn <= H[i]:
            minn = H[i]
        else:
            tmp = 1

    if tmp == 0:
        print("Yes")
    else:
        print("No")
import numpy as np

x1, y1, x2, y2 = map(int, input().split())

a = np.array([[x1], [y1]])
b = np.array([[x2], [y2]])

rot = np.array([[0, -1], [1, 0]])
ab = b - a
bc = np.dot(rot, ab)

c = b + bc
d = a + bc

# print(a, b)
# print(c, d)

print(*c.flatten(), *d.flatten(), sep=" ")

### FIXED CODE ###

import numpy as np

x1, y1, x2, y2 = map(int, input().split())

a = np.array([[x1], [y1]])
b = np.array([[x2], [y2]])

rot = np.array([[0, -1], [1, 0]])
ab = b - a
bc = np.dot(rot, ab)

c = b + bc
d = a + bc

# print(a, b)
# print(c, d)

print(*c.flatten(), end=" ")
print(*d.flatten())
N=int(input())
list=[]
for i in range(1:10):
  for j in range(1:10):
    list.append(i*j)
if N in list:
   print("Yes")
 else:
   print("No")
    

### FIXED CODE ###

N=int(input())
list=[]
for i in range(1,10):
  for j in range(1,10):
    list.append(i*j)
if N in list:
   print("Yes")
else:
   print("No")
n = int(input())
a = [input() for i in range(n)]

min_value = -200000

for a in range(a)
    max_value = max(max_value,a - min_value)
    min_value = min(min_value,a)
print(max_value)



### FIXED CODE ###

n = int(input())
R = [int(input()) for i in range(n)]

minv = R[0]
maxv = R[1] - R[0]
for j in range(1, n):
	if (maxv < R[j] - minv):
		maxv = R[j] - minv
	if (R[j] < minv):
		minv = R[j]
    
print(maxv)
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())

a = A % 10
b = B % 10
c = C % 10
d = D % 10
e = E % 10

l = [a,b,c,d,e]
m = min([i for i in l if i != 0])
n = l.count(0)
ans = (A//10 + B//10 + C//10 + D//10 + E//10)*10 + m + (5-n)*10-10
print(ans)



### FIXED CODE ###

A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())

a = A % 10
b = B % 10
c = C % 10
d = D % 10
e = E % 10

l = [a,b,c,d,e]
if len([i for i in l if i != 0]) == 0:
    m = 10
    
else:
    m = min([i for i in l if i != 0])
n = l.count(0)
ans = (A//10 + B//10 + C//10 + D//10 + E//10)*10 + m + (5-n)*10 -10
print(ans)
import sys
sys.setrecursionlimit(100000)
readline = sys.stdin.readline

N , Q = map(int,readline().rstrip().split())
G = [[] for _ in range(N)]
for n in range(N-1):
    a , b = map(int,readline().rstrip().split())
    G[a-1].append(b-1)
query = [0] * N
for q in range(Q):
    p , x = map(int,readline().rstrip().split())
    query[p-1] += x
counter = [0] * N 
visit = [0] * N

def dfs(root , x ):
    if visit[root] == 0:
        visit[root] = 1
        x += query[root]
        counter[root] += x
    else:
        return 0
    
    for g in G[root]:
        dfs( g, x )

    return 0

def solve():
    dfs(0 , 0)
    [print(c , end = " " ) for c in counter]
    print("")

if __name__ == "__main__":
    solve()

### FIXED CODE ###

import sys
sys.setrecursionlimit(10000000)
readline = sys.stdin.readline

N , Q = map(int,readline().rstrip().split())
G = [[] for _ in range(N)]
for n in range(N-1):
    a , b = map(int,readline().rstrip().split())
    G[a-1].append(b-1)
    G[b-1].append(a-1)
query = [0] * N
for q in range(Q):
    p , x = map(int,readline().rstrip().split())
    query[p-1] += x
counter = [0] * N 
visit = [0] * N

def dfs(root , x ):
    if visit[root] == 0:
        visit[root] = 1
        x += query[root]
        counter[root] += x
    else:
        return 0
    
    for g in G[root]:
        dfs( g, x )

    return 0

def solve():
    dfs(0 , 0)
    [print(c , end = " " ) for c in counter]
    print("")

if __name__ == "__main__":
    solve()
import bisect
import heapq
import math
import random
import sys
from collections import Counter, defaultdict, deque
from decimal import Decimal
from functools import lru_cache, reduce
from itertools import combinations, combinations_with_replacement, product, permutations
from operator import add, mul, sub, itemgetter
import numpy as np

sys.setrecursionlimit(10000)

def read_int():
	return int(sys.stdin.readline().strip())

def read_int_n():
	return [int(x) for x in sys.stdin.readline().strip().split()]

def read_float():
	return float(sys.stdin.readline().strip())

def read_float_n():
	return [float(x) for x in sys.stdin.readline().strip().split()]

def read_str():
	return sys.stdin.readline().strip()

def read_str_n():
	return [str(x) for x in sys.stdin.readline().strip().split()]

def error_print(*args):
	print(*args, file=sys.stderr)

def mt(f):
	import time
	def wrap(*args, **kwargs):
		s = time.time()
		ret = f(*args, **kwargs)
		e = time.time()
		error_print(e - s, 'sec')
		return ret
	return wrap

@mt
def slv(S):
	c = Counter(S)
	ans = c['+'] - c['-']
	return ans

def main():
	S = read_str()
	print(slv(S))

if __name__ == '__main__':
	main()

### FIXED CODE ###

#from sys import stdin
#input = stdin.readline

S = input()
n = 0

for i in S:
    if i == '+':
        n += 1
    else:
        n -= 1

print(n)
def main():
    N, M, K = map(int, input().split())
    a = list(map(int, input().split()))
    b = list(map(int, input().split()))
    
    if a[0] > K and b[0] > K:
        return 0

    a2=[0]
    for i in a:a2.append(a2[-1]+i)
    b2=[0]
    for i in b:b2.append(b2[-1]+i)
    ans = 0
    j = M
    
    for i in range(N + 1):
        if a[i] > K:
            break
        while b[j] > K - a[i]:
            j -= 1
        ans = max(ans, i + j)    
    return ans

if __name__ == '__main__':
    print(main())

### FIXED CODE ###

def main():
    N, M, K = map(int, input().split())
    a = list(map(int, input().split()))
    b = list(map(int, input().split()))
    
    if a[0] > K and b[0] > K:
        return 0

    a2=[0]
    for i in a:a2.append(a2[-1]+i)
    b2=[0]
    for i in b:b2.append(b2[-1]+i)
    ans = 0
    j = M
    
    for i in range(N + 1):
        if a2[i] > K:
            break
        while b2[j] > K - a2[i]:
            j -= 1
        ans = max(ans, i + j)    
    return ans

if __name__ == '__main__':
    print(main())
#include <iostream>
using namespace std;

int main(){
    int M, D;
    cin >> M >> D;
    int ans = 0;
    for(int m = 1;m<=M;m++){
        for(int d=1;d<=D;d++){
            if(d % 10 >= 2 && d/10 >= 2 && (d%10)*(d/10) == m){
                ans += 1;
            }
        }
    }
    cout << ans << endl;
}

### FIXED CODE ###

from math import sqrt
M, D = map(int, input().split())
ans = 0
for i in range(1, M+1):
    for j in range(1, D+1):
        if j//10 >= 2 and j%10 >= 2:
            if (j//10)*(j%10) == i:
                ans += 1

print(ans)
import sys 
MOD = 10**9 +7
INF = 10**5

def main():
    n,s = map(int,input().split())
    a = list(map(int,input().split()))

    dp = [[0] * (s + 1) for _ in range(n + 1)]
    for i in range(n):
        num = a[i]
        for j in range(1,s + 1):
            dp[i + 1][j] = dp[i][j] + dp[i][j - a[i]]
    
    print(dp[-1][-1])
if __name__=='__main__':
    main()

### FIXED CODE ###

import sys
sys.setrecursionlimit(10000000)
MOD = 998244353
INF = 10 ** 15

def main():
    N,S = map(int,input().split())
    A = list(map(int,input().split()))

    before = [0] * (1 + S)
    before[0] = 1
    ans = 0
    for a in A:
        now = [0] * (1 + S)
        for i in range(S + 1):
            now[i] += before[i]
            if i + a <= S:
                now[i + a] += before[i]
                now[i + a] %= MOD
        now[0] += 1
        ans += now[S]
        ans %= MOD
        before = now
    print(ans)
if __name__ == '__main__':
    main()
import numpy as np


def read():
    N, T = list(map(int, input().strip().split()))
    A = list()
    B = list()
    for i in range(N):
        a, b = list(map(int, input().strip().split()))
        A.append(a)
        B.append(b)
    return N, T, A, B

def solve(N, T, A, B):
    dp1 = [[0 for j in range(T)] for i in range(N+2)]
    dp2 = [[0 for j in range(T)] for i in range(N+2)]
    for i in range(1, N+1, 1):
        for t in range(T):
            if A[i-1] <= t:
                dp1[i][t] = max(dp1[i-1][t-A[i-1]] + B[i-1], dp1[i-1][t])
            else:
                dp1[i][t] = dp1[i-1][t]
    for i in range(N, 0, -1):
        for t in range(T):
            if A[i-1] <= t:
                dp2[i][t] = max(dp2[i+1][t-A[i-1]] + B[i-1], dp2[i+1][t])
            else:
                dp2[i][t] = dp2[i-1][t]
    v = 0
    for i in range(1, N+1, 1):
        for j in range(T):
            v = max(v, dp1[i-1][j] + dp2[i+1][(T-1) - j] + B[i-1])
    return v


if __name__ == '__main__':
    inputs = read()
    print("%s" % solve(*inputs))


### FIXED CODE ###

import itertools


def read():
    N, T = list(map(int, input().strip().split()))
    A = list()
    B = list()
    for i in range(N):
        a, b = list(map(int, input().strip().split()))
        A.append(a)
        B.append(b)
    return N, T, A, B


def solve(N, T, A, B):
    dp1 = [[0 for j in range(T)] for i in range(N+2)]
    dp2 = [[0 for j in range(T)] for i in range(N+2)]
    for i, t in itertools.product(range(N), range(T)):
        u = t - A[i]
        if u >= 0:
            dp1[i+1][t] = max(dp1[i][u] + B[i], dp1[i][t])
        else:
            dp1[i+1][t] = dp1[i][t]
        u = t - A[N-1-i]
        if u >= 0:
            dp2[N-i][t] = max(dp2[N+1-i][u] + B[N-1-i], dp2[N+1-i][t])
        else:
            dp2[N-i][t] = dp2[N+1-i][t]
    v = 0
    for i, t in itertools.product(range(N), range(T)):
        v = max(v, dp1[i][t] + dp2[i+2][(T-1) - t] + B[i])
    return v


if __name__ == '__main__':
    inputs = read()
    print("%s" % solve(*inputs))
import heapq

nv, ne = map(int, input().split())

edges = [set() for _ in range(nv)]
while ne:
    s, t, w = map(int, input().split())
    edges[s].add((w, t))
    edges[t].add((w, s))
    ne -= 1

cost = 0
queue = list(edges[0])
heapq.heapify(queue)
visited = [False] * nv
visited[0] = True

while True:
    edge_cost, t = heapq.heappop(queue)
    if visited[t]:
        continue
    visited[t] = True
    cost += edge_cost
    if all(visited):
        break
    for e in edges[t]:
        if not visited[e[1]]:
            heapq.heappush(queue, e)

print(cost)

### FIXED CODE ###

import heapq

nv, ne = map(int, input().split())

edges = [set() for _ in range(nv)]
while ne:
    s, t, w = map(int, input().split())
    edges[s].add((w, t))
    edges[t].add((w, s))
    ne -= 1

cost = 0
queue = list(edges[0])
heapq.heapify(queue)
visited = [False] * nv
visited[0] = True

while queue:
    edge_cost, t = heapq.heappop(queue)
    if visited[t]:
        continue
    visited[t] = True
    cost += edge_cost
    if all(visited):
        break
    for e in edges[t]:
        if not visited[e[1]]:
            heapq.heappush(queue, e)

print(cost)
import sys
from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt, ceil, floor
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache, reduce
from operator import xor
from heapq import heappush, heappop
INF = float("inf")
sys.setrecursionlimit(10**7)

# 4近傍（右, 下, 左, 上）
dy4, dx4 = [0, -1, 0, 1], [1, 0, -1, 0]


def inside(y: int, x: int, H: int, W: int) -> bool: return 0 <= y < H and 0 <= x < W
def ceil(a, b): return (a + b - 1) // b

YES = "Yes"
NO = "No"


def check(x, nums):
    x = abs(x)
    dp = [False] * (x + 1)
    dp[0] = True
    for y in nums:
        tmp = [False] * (x + 1)
        for i in range(len(dp)):
            if i + y < len(tmp):
                tmp[i + y] |= dp[i]
            if i - y >= 0:
                tmp[i - y] |= dp[i]
        dp = tmp
    return dp[x]


def solve(s, x, y):
    type_num = [(k, len(list(g))) for k, g in groupby(s)]
    if s[0] == "F":
        x -= type_num[0][1]
        type_num.pop(0)

    h, v = [], []
    now = 0
    for t, n in type_num:
        if t == "F":
            if now == 0:
                h.append(n)
            else:
                v.append(n)
        else:
            if n % 2 != 0:
                now = (now + 1) % 2
    return YES if check(x, h) and check(y, v) else NO


def main():
    s = input()
    x, y = map(int, input().split())

    print(solve(s, x, y))

if __name__ == '__main__':
    main()


### FIXED CODE ###

import sys
from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt, ceil, floor
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache, reduce
from operator import xor
from heapq import heappush, heappop
INF = float("inf")
sys.setrecursionlimit(10**7)

# 4近傍（右, 下, 左, 上）
dy4, dx4 = [0, -1, 0, 1], [1, 0, -1, 0]


def inside(y: int, x: int, H: int, W: int) -> bool: return 0 <= y < H and 0 <= x < W
def ceil(a, b): return (a + b - 1) // b


def main():
    N = int(input())
    a = Counter(list(map(int, input().split())))

    ans = 0
    for k, v in a.items():
        if k == v:
            continue
        elif k < v:
            ans += v - k
        else:
            ans += v
    print(ans)

if __name__ == '__main__':
    main()
# -*- coding: utf-8 -*-

H, W = map(int, input().split())
A = []
for i in range(H):
    for j in range(W):
        A[i] += input()

A = ["#" * W+2] + A + ["#" * W+2]

for i in A:
    print(i)

### FIXED CODE ###

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

H, W = map(int, input().split())
A = []
for i in range(H):
    A.append("#")
    a = input()
    A[i] += a + "#"

A = ["#" * (W+2)] + A + ["#" * (W+2)]

for i in A:
    print(i)
N = int(input())
alpha = [-1]
alpha.extend([chr(ord('a') + i) for i in range(26)])
q = N
mod = N
ans = ''
while q >= 27:
    q, mod = divmod(q, 26)
    ans = alpha[mod] + ans
if mod != 0:
    ans = alpha[q] + ans
print(ans)


### FIXED CODE ###

import re

input_str = input()
if re.match(r'[A-Z]', input_str):
    print('A')
else:
    print('a')
import collections
N = map(int, input().split())
A = list(map(int, input().split()))
Q = map(int, input().split())
 
base = 0
cnt = collections.Counter(A)    
ANS = []
 
for i in range(N):
    base += A[i]

for i in range(Q):
  b,c = map(int, input().split())
  ans = base + (c-b) * cnt[b]
  ANS.append(ans)
  cnt[c] += cnt[b]
  cnt[b] = 0
  base = ans

for i in ANS:
  print(i)

### FIXED CODE ###

import collections

n = int(input())
A = list(map(int, input().split()))
q = int(input())

CNT = collections.Counter(A)
ANS = []
ans = sum(A)

for i in range(q):
    b, c = map(int, input().split())
    t = CNT[b]
    ans +=(c - b) * t
    ANS.append(ans)
    CNT[c] += t
    CNT[b] = 0

for i in ANS:
    print(i)
# http://nobuta05.hatenablog.com/entry/2015/11/12/013938

def get_edge(M, u, U=None):

    if U == None:
        for x in M[:]:
            if x[0] == u:
                return x[1]
            elif x[1] == u:
                return x[0]

    else:
        for x in M[:]:
            if x[0] == u and x[1] in U:
                return x[1]
            elif x[1] == u and x[0] in U:
                return x[0]
    return None

def get_nodes(M):
    U = set()
    V = set()
    for x in M:
        U.add(x[0])
        V.add(x[1])
    return (U, V)


def augpath(Si, Ti, M, E):
    (U, V) = get_nodes(M)
    Ti1 = set(x[1] for x in E if x[0] in Si and not x[1] in Ti)
    
    if Ti1 == set():
        return (M, None)

    elif Ti1.difference(V) == set():
        Si1 = set(x[0] for x in M if x[1] in Ti1)
        (M, ui1) = augpath(Si1, Ti.union(Ti1), M, E)

        if ui1 == None:
            return (M, None)

        else:
            v = get_edge(M, ui1)
            M.remove((ui1,v))

            ui = get_edge(E, v, U=Si)
            M.append((ui,v))
            
            return (M, ui)

    else:
        v = Ti1.difference(V).pop()
        u = get_edge(E, v, U=Si)
        M.append((u,v))

        return (M, u)
    

def Hungary(U0, V0, E):
    U_bef = set()
    M = []
    cnt = 0
    length = len(U0)
    
    # CALC
    while True:

        # INIT
        (U, V) = get_nodes(M)
        u = U0[cnt%length]
        cnt = cnt + 1
        S0 = set()
        S0.add(u)
        T0 = set()

        # 終了条件(すべての頂点から始まる増大道を調べて、マッチング数が変わっていなければ、それ以上増えることはない)
        if cnt % length == 0:
            if U.difference(U_bef) == set():
                break
            U_bef = U.copy()

        # 枝刈り(すでにマッチングしている頂点から始まる道は増大道ではない)
        if u in U:
            continue
        
        #CALC
        (M, u) = augpath(S0, T0, M, E)
    
    return M


N = int(input())
AB = [[int(_) for _ in input().split()] for i in range(N)]
CD = [[int(_) for _ in input().split()] for i in range(N)]

E = []

for i in range(N):
    for j in range(N):
        if AB[i][0] < CD[j][0] and AB[i][1] < CD[j][1]:
            E.append((i, j))

M = Hungary(range(N), range(N), E)
print(len(M))


### FIXED CODE ###

N = int(input())
AB = [tuple(int(_) for _ in input().split()) for i in range(N)]
CD = [tuple(int(_) for _ in input().split()) for i in range(N)]

AB.sort(key=lambda xy:xy[1], reverse=True)
CD.sort()
for c, d in CD:
    for a, b in AB:
        if a < c and b < d:
            AB.remove((a, b))
            break

print(N - len(AB))
#!/usr/bin/env python3
import sys

YES = "Yes"  # type: str
NO = "No"  # type: str


def solve(H: int, W: int, S: "List[str]"):
    for i in range(H):
        for j in range(W):
            if S[i][j] == ".":
                continue
            if i - 1 >= 0:
                if S[i - 1][j] == "#":
                    continue
            if i + 1 < H:
                if S[i + 1][j] == "#":
                    continue
            if j - 1 >= 0 and S[i][j - 1] == "#":
                continue
            if j + 1 < W and S[i][j + 1] == "#":
                continue
            print(NO)
            return
    print(YES)
    return


# Generated by 1.1.7.1 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()
    H = int(next(tokens))  # type: int
    W = int(next(tokens))  # type: int
    S = [list(next(tokens)) for _ in range(W)]  # type: "List[str]"
    solve(H, W, S)


if __name__ == "__main__":
    main()


### FIXED CODE ###

#!/usr/bin/env python3
import sys

YES = "Yes"  # type: str
NO = "No"  # type: str


def solve(H: int, W: int, S: "List[str]"):
    for i in range(H):
        for j in range(W):
            if S[i][j] == ".":
                continue
            if i - 1 >= 0:
                if S[i - 1][j] == "#":
                    continue
            if i + 1 < H:
                if S[i + 1][j] == "#":
                    continue
            if j - 1 >= 0 and S[i][j - 1] == "#":
                continue
            if j + 1 < W and S[i][j + 1] == "#":
                continue
            print(NO)
            return
    print(YES)
    return


# Generated by 1.1.7.1 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()
    H = int(next(tokens))  # type: int
    W = int(next(tokens))  # type: int
    S = [list(next(tokens)) for _ in range(H)]  # type: "List[str]"
    solve(H, W, S)


if __name__ == "__main__":
    main()
import sys
import math

sys.setrecursionlimit(5000)

A, B, Q = map(int, input().split())
LIMIT = 2*(10**10)
shrines = [-LIMIT] + [int(input()) for i in range(A)] + [LIMIT]
temples = [-LIMIT] + [int(input()) for j in range(B)] + [LIMIT]

def b_temp_search(num, idx):
    if num >= temples[idx] and num <= temples[idx+1]:
        return idx
    elif num < temples[idx]:
        if idx == 1:
            return 0
        return b_temp_search(num, math.ceil(idx/2))
    else:
        if idx == B:
            return B
        return b_temp_search(num, math.ceil((B+idx)/2))

def b_sh_search(num, idx):
    if num >= shrines[idx] and num <= shrines[idx+1]:
        return idx
    elif num < shrines[idx]:
        if idx == 1:
            return 0
        return b_sh_search(num, math.ceil(idx//2))
    else:
        if idx == A:
            return A
        return b_sh_search(num, math.ceil((A+idx)/2))

for k in range(Q):
    x = int(input())
    sh_idx = b_sh_search(x, A//2)
    temp_idx = b_temp_search(x, B//2)
    ptn1 = max(abs(x-shrines[sh_idx]), abs(x-temples[temp_idx]))
    ptn2 = max(abs(x-shrines[sh_idx+1]), abs(x-temples[temp_idx+1]))
    ptn3 = min((temples[temp_idx+1] - x)*2 + x - shrines[sh_idx], temples[temp_idx+1] - x + (x - shrines[sh_idx])*2)
    ptn4 = min((shrines[sh_idx+1] - x)*2 + x - temples[temp_idx], shrines[sh_idx+1] - x + (x - temples[temp_idx])*2)
    ans = min(ptn1, ptn2, ptn3, ptn4)
    print(ans)

### FIXED CODE ###

from bisect import bisect_left, bisect_right
INF = 10**12
A, B, Q = map(int, input().split())
shrines = [-INF] + [int(input()) for _ in range(A)] + [INF]
temples = [-INF] + [int(input()) for _ in range(B)] + [INF]
for _ in range(Q):
  query = int(input())
  sh_pos = bisect_left(shrines, query)
  te_pos = bisect_left(temples, query)
  ans = INF
  for s in shrines[sh_pos-1:sh_pos+1]:
    for t in temples[te_pos-1:te_pos+1]:
      dis = min(abs(s-query)+abs(s-t),abs(t-query)+abs(t-s))
      ans = min(ans, dis)
  print(ans)
x , y = map(int(input().split()))

if (x * y )%2 == 0:
  print("Even")
  else:
    print("Odd")


### FIXED CODE ###

x , y = map(int,input().split())
 
if (x * y )%2 == 0:
  print("Even")
else:
  print("Odd")
A,B,K=(int(i) for i in input().split())
L=list(range(A,B+1))
a=B-A+1
if K>a:
  for i in L:
    print(i)
else:
  S=list(set(L[:K]+L[a-K:a]))
  S.sort()
  for i in S:
    print(i)

### FIXED CODE ###

A,B,K=(int(i) for i in input().split())
a=B-A+1
if K>=a:
  for i in range(A,B+1):
    print(i)
else:
  L1=list(range(A,A+K))
  L2=list(range(B-K+1,B+1))
  S=list(set(L1+L2))
  S.sort()
  for i in S:
    print(i)
n, m = map(int, input().split())
road = [0] * n

for i in m:
    a, b = map(int, input().split())
    road[a-1] =+ 1
    road[b-1] =+ 1

for i in road:
    print(i)

### FIXED CODE ###

n, m = map(int, input().split())
road = [0] * n

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

for i in road:
    print(i)
import fractions
import numpy as np

from sys import stdin


def main():
    n = int(stdin.readline())
    a = list(map(int, stdin.readline().split()))
    sa = set(a)

    lcm = 1

    for ai in sa:
        lcm = (ai * lcm) // fractions.gcd(ai, lcm)

    ans = 0

    ans = np.sum([lcm // ai for ai in a])

    ans %= 10 ** 9 + 7

    print(ans)


if __name__ == "__main__":
    main()


### FIXED CODE ###

import fractions

from sys import stdin


def main():
    n = int(stdin.readline())
    a = list(map(int, stdin.readline().split()))
    sa = set(a)

    lcm = 1

    for ai in sa:
        lcm = (ai * lcm) // fractions.gcd(ai, lcm)

    ans = 0

    for ai in a:
        ans += lcm // ai
    ans %= 10 ** 9 + 7

    print(ans)


if __name__ == "__main__":
    main()