Harryxun/stf_run huggingface dataset:
import sys
input = sys.stdin.readline


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


def main():
    N, M = map(int, input().split())
    tmp = list(map(int, input().split()))
    A = []
    for i in tmp:
        if i % 2 == 0:
            A.append(i)
    d = A[0]
    for a in A:
        d = lcm(d, a)
    ans = (2*M)//d/2
    ans = -(-ans//1)
    print(int(ans))


if __name__ == '__main__':
    main()


### FIXED CODE ###

import sys
input = sys.stdin.readline


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


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

    t = 1
    for a in A:
        if a & 1:
            print(0)
            return
        else:
            t = lcm(t, a//2)
    for a in A:
        if t % a == 0:
            print(0)
            exit()

    ans = M//t/2
    ans = -(-ans//1)
    print(int(ans))


if __name__ == '__main__':
    main()
import numpy as np
n, k = map(int, input().split())
def f(x):
    return sum(range(1, x + 1)) / x
p = [f(int(i)) for i in input().split()]
s = np.cumsum(p)
print(max(s[k-1], max(s[k:] - s[:n - k])))

### FIXED CODE ###

import sys
n, k = map(int, input().split())
p = [int(i) for i in input().split()]
total = [0] * n
total[0] = sum(range(1, p[0] + 1)) / p[0]
max_value = 0
if k == 1:
    print(sum(range(1, max(p) + 1)) / max(p))
    sys.exit()
elif k == n:
    print(sum([sum(range(1, i + 1)) / i for i in p]))
    sys.exit()
for i in range(1, n):
    total[i] = total[i - 1] + sum(range(1, p[i] + 1)) / p[i]
    
    if i == k - 1:
        max_value = total[i]
    elif i >= k:
        max_value = max(max_value, total[i] - total[i - k])
print(max_value)
s = input()
t = 0
if s[0] == "1":
    t++

if s[1] == "1":
    t++

if s[2] == "1":
    t++

print(t)


### FIXED CODE ###

s = input()
t = 0
if s[0] == "1":
    t += 1

if s[1] == "1":
    t += 1

if s[2] == "1":
    t += 1

print(t)
N = int(input())
R = int(input())
if N >= 10:
  print(R)
else:
  print(R + 100*(10-N))

### FIXED CODE ###

n = input().split()
if int(n[0]) >= 10:
  print(n[1])
else:
  print(int(n[1]) + 100*(10-int(n[0])))
a, b, k = map(int, input().split())
div = []
for i in range(1, max(a, b)):
    if (a % i == 0) and (b % i == 0):
        div.append(i)
if len(div) == 0:
    print(1)
else:
    div.sort()
    print(div[-k])


### FIXED CODE ###

a, b, k = map(int, input().split())
div = []
for i in range(1, 105):
    if (a % i == 0) and (b % i == 0):
        div.append(i)

if len(div) < k: 
    print(max(div))
else:
    div.sort()
    print(div[-k])
import math
 
a, b = map(str, input().split())
input = int(a + b)

for i in range(1000):
  if input == i**2 :
  	print('Yes')
    break

print('No')

### FIXED CODE ###

import math, sys
 
a, b = map(str, input().split())
input = int(a + b)

for i in range(1000):
  if input == i**2 :
    print('Yes')
    sys.exit(0)

print('No')
N=int(input())
import sys
ab=[[int(j) for j in sys.stdin.readline()] for _ in range (N-1)]
con=[[] for _ in range(N+1)]

for a,b in ab :
  con[a].append(b)
  con[b].append(a)

#black Fennec
pc=[0]*(N+1)
q=[(1,0)]
vis=[False]*(N+1)
vis[1]=True
Fcnt=N
while q:
  n,c=q.pop()
  pc[n]=c
  for ch in con[n]:
    if vis[ch]==True:
      continue
    q.append((ch,c+1))
    
q=[(N,0)]
vis=[False]*(N+1)
vis[1]=True
while q:
  n,c=q.pop()
  if pc[n]>c:
    Fcnt-=1
  for ch in con[n]:
    if vis[ch]==True:
      continue
    q.append((ch,c+1))
    
if Fcnt>N-Fcnt:
  print("Fennec")
else:
  print("Snuke")

### FIXED CODE ###

N=int(input())

import sys
sys.setrecursionlimit(10**5)
ab=[list(map(int, input().split())) for _ in range (N-1)]
con=[[] for _ in range(N+1)]

#print(ab)
for a,b in ab :
  con[a].append(b)
  con[b].append(a)

#black Fennec
pc=[0]*(N+1)
q=[(1,0)]
vis=[False]*(N+1)
vis[1]=True
Fcnt=N
while q:
  n,c=q.pop()
  pc[n]=c
  for ch in con[n]:
    if vis[ch]==True:
      continue
    vis[ch]=True
    q.append((ch,c+1))
    
q=[(N,0)]
vis=[False]*(N+1)
vis[N]=True
while q:
  n,c=q.pop()
  if pc[n]>c:
    Fcnt-=1
  for ch in con[n]:
    if vis[ch]==True:
      continue
    vis[ch]=True
    q.append((ch,c+1))
    
if Fcnt>N-Fcnt:
  print("Fennec")
else:
  print("Snuke")
n,m = map(int,input().split())
f = [False for _ in range(n)]
a = [[] for _ in range(n)]
res = 0

def dfs(k):
    f[k] = True
    for g in a[k]:
        if not f[g]:
            dfs(g)

for _ in range(m):
    x,y,z = map(int,input().split())
    a[x-1].append(y-1)
    a[y-1].append(x-1)

for i in range(n):
    if not f[i]:
        res += 1
        dfs(i)

print(res)

### FIXED CODE ###

import sys
sys.setrecursionlimit(10**7)
n,m = map(int,input().split())
f = [False for _ in range(n)]
a = [[] for _ in range(n)]
res = 0

def dfs(k):
    f[k] = True
    for g in a[k]:
        if not f[g]:
            dfs(g)

for _ in range(m):
    x,y,z = map(int,input().split())
    a[x-1].append(y-1)
    a[y-1].append(x-1)

for i in range(n):
    if not f[i]:
        res += 1
        dfs(i)
print(res)
N=int(input())
A=int(input())
B=int(input())

train=A*N
taxi=B
if (train<=taxi):
  print(train)
else:
  print(taxi)

### FIXED CODE ###

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

train=a[0]*a[1]
taxi=a[2]
if (train<=taxi):
  print(train)
else:
  print(taxi)
n = int(input())
s = [input() for i in range(n)]
m = int(input())
t = [input() for i in range(n)]
ans = 0

for i in set(s):
  num = s.count(i) - t.count(i)
  if num > ans :
    ans = num
    
    
print(ans)



### FIXED CODE ###

n = int(input())
s = [input() for i in range(n)]
m = int(input())
t = [input() for i in range(m)]
ans = 0

for i in set(s):
  num = s.count(i) - t.count(i)
  if num > ans :
    ans = num
    
    
print(ans)
import math
import os
import random
import re
import sys
import collections
import itertools

def solution(data):
    return data[:3]


if __name__=="__main__":
  	a = input()

    print(solution(a))


### FIXED CODE ###

import math
import os
import random
import re
import sys
import collections
import itertools

def solution(data):
    return data[:3]


if __name__=="__main__":
    a = input()
    print(solution(a))
#include <iostream>
#include <algorithm>

using namespace std;

int N;
int A[200010], B[200010];
pair<int, int> C[200010];

int main(){
    cin >> N;
    for(int i=1;i<=N;i++){
        cin >> A[i] >> B[i];
        //<b, i>のpairを作りAにアクセスできるようにする
        C[i] = {B[i], i};
    }
    sort(C+1, C+N+1);
    int time = 0;
    for(int i=1;i<=N;i++){
        int id = C[i].second;
        if(time + A[id] <= B[id]) time += A[id];
        else{
            cout << "No" << endl;
            return 0;
        }
    }
    cout << "Yes" << endl;
    return 0;
}

### FIXED CODE ###

N = int(input())
T = sorted([tuple(map(int, input().split())) for _ in range(N)], key=lambda x:x[1])
now = 0
for a, b in T:
    if now + a <= b:
        now += a
    else:
        print("No")
        exit()
print("Yes")
def gcd(x, y):
    """
    ユークリッドの互除法を用いて最大公約数を求める
    """
    if not x:
        return y
    return gcd(y % x, x)

def dfs(L, A):
    if not len(L):
        return A
    return gcd(dfs(L[:-1], L[-1]), A)

def get_M_i(A, i):
    """
    i番目のAを取り除いて得られる最大公約数を返す
    """
    L = dfs(A[:i-1], A[i-1]) if i > 0 else 0
    R = dfs(A[i+1:-1], A[-1]) if i+1 < len(A) else 0
    return gcd(L, R)

if __name__ == "__main__":
    N = int(input())
    A = list(map(int, input().split()))

    # i番目のMの値はi番目のAを取り除いて得られるN-1個の整数の最大公約数
    M = [0 for _ in range(N)]

    for i in range(N):
        M[i] = get_M_i(A, i)

    print(max(M))

### FIXED CODE ###

from fractions import gcd 

N = int(input())
A = [int(i) for i in input().split()]

# Lを埋める
L = [0 for _ in range(N+1)]
for i in range(1, N+1):
    if not L[i-1]:
        L[i] = A[i-1]
    else: 
        L[i] = gcd(L[i-1], A[i-1])

# Rを埋める
R = [0 for _ in range(N+1)]
for i in range(1, N+1)[::-1]:
    if not R[i]:
        R[i-1] = A[i-1] 
    else:
        R[i-1] = gcd(R[i], A[i-1])

# Mを埋める
M = [0 for _ in range(N)]
for i in range(N):
    if not L[i]:
        M[i] = R[i+1]
    elif not R[i]:
        M[i] = L[i]
    else: 
        M[i] = gcd(L[i], R[i+1])

print(max(M))
l = map(int, raw_input().split())
# print(d)
# print(n)
d = l[0]
n = l[1]

if d == 0:
	print(n)
elif d == 1:
	print(n*100*d)
elif d == 2:
	print(n*10000)

### FIXED CODE ###




# import configparser
# import time


# class GetTime():
#     now = time.ctime()

    
#     def debug(self):
#         print('-------debug-begin---------------')
#         print(self.now)
#         parsed = time.strptime(self.now)
#         print(time.strftime("%a %b %d %H:%M:%S %Y", parsed))
#         print('-------debug-end---------------')


# class Person():
#     def __init__(self, name, id):
#         self.name = name
#         self.id = id


# class Greet(Person):
#     def morning(self):
#         print('Good morning ' + self.name)

#     def night(self):
#         print('Good night ' + self.name)


# hunter = Person('Hoge Fugo', 1)

# print('name:%s   id:%s' % (hunter.name, hunter.id))

# o = Greet('Bob', 4)
# o.morning()


# t = GetTime()
# t.debug()

# ##

# poem = 'Hello,friends'
# fout = open('relavity','wt')
# # print(poem, file=fout)
# fout.close()

# ##





# # config.read('exe.ini')
# # print(MySQL_setting['Port'])
# # config.read('exe.ini')
# # print(MySQL_setting['Port'])

# class init_setting():
#     def input(self):
#         print('input port number:')
#         port=input()
#         print('input user name:')
#         user=input()

#         print(port,user)

        
#         with open('example.ini','w') as conf:
#             config.write(conf)

#         config=configparser.ConfigParser()
#         config['MySQL_setting']={}
#         MySQL_setting=config['MySQL_setting']


#         MySQL_setting['Port']=port
#         MySQL_setting['user']=user

#         config.sections()


# MakeSetting=init_setting()
# MakeSetting.input()


# MySQL_setting['Port']=port
# # MySQL_setting['user']=user

# empty_list = []
# print(empty_list)

# weekdays=['monday','Tuesday','Wednesday','Thursday','Friday']

# for i in weekdays:
#     print(weekdays)

# print(weekdays[0])

# for i in weekdays:
# 	print(i)

# a_tuple=('ready','fire','class')


# list('cat')


#! bin/env/python python3
# -*- coding:utf-8 -*-

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


# print(d)
# print(n)

if d == 0:
	if n ==100:
		print(101)
	else:
		print(n)
elif d == 1:
	if n ==100:
		print(10100)
	else:
		print(n*100*d)


elif d == 2:
	if(n == 100):
		print(1010000)
	else:
		print(n*10000)
import sys
input = sys.stdin.readline

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

#Union Find

#xの根を求める
def find(x):
    if par[x] < 0:
        return x
    else:
        par[x] = find(par[x])
        return par[x]
#xとyの属する集合の併合
def unite(x,y):
    x = find(x)
    y = find(y)

    if x == y:
        return False
    else:
        #sizeの大きいほうがx
        if par[x] > par[y]:
            x,y = y,x
        par[x] += par[y]
        par[y] = x
        return True

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

#xが属する集合の個数
def size(x):
    return -par[find(x)]

N, M, K = map(int, input().split())
par = [-1 for i in range(N)]
rank = [0] * N
frendCnt = [0] * N
bloc = [[] for _ in range(N)]
for i in range(M):
    a, b = map(int, input().split())
    a -= 1
    b -= 1
    frendCnt[a] += 1
    frendCnt[b] += 1
    unite(a, b)

for i in range(K):
    c, d = map(int, input().split())
    c -= 1
    d -= 1
    bloc[c].append(d)
    bloc[d].append(c)

for i in range(N):
    ans = size(i) - frendCnt[i] - 1
    for j in bloc[i]:
      if same(i, j):
           ans -= 1
    print(ans, end=' ')

### FIXED CODE ###

import sys
input = sys.stdin.readline

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

#Union Find

#xの根を求める
def find(x):
    if par[x] < 0:
        return x
    else:
        par[x] = find(par[x])
        return par[x]
#xとyの属する集合の併合
def unite(x,y):
    x = find(x)
    y = find(y)

    if x == y:
        return False
    else:
        #sizeの大きいほうがx
        if par[x] > par[y]:
            x,y = y,x
        par[x] += par[y]
        par[y] = x
        return True

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

#xが属する集合の個数
def size(x):
    return -par[find(x)]

#初期化
#根なら-size,子なら親の頂点
par = [-1]*n

num = [0]*n

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

edge = [[] for i in range(n)]

for i in range(k):
    c,d = map(int,input().split())
    edge[c-1].append(d-1)
    edge[d-1].append(c-1)


for i in range(n):
    cnt = size(i) - num[i] - 1
    for e in edge[i]:
        if same(e,i):
            cnt -= 1
    print(cnt,end=' ')
import sys
import numpy as np
from numba import njit
input = sys.stdin.buffer.readline

N = int(input())
vws = [tuple(map(int, input().split())) for _ in range(N)]

n = min(2**10, N)

dp = np.zeros((n, 10**5+1), np.int32)
dp[0, vws[0][1]:] = vws[0][0]
for i in range(1, n):
    v, w = vws[i]
    dp[i] = dp[(i-1)//2]
    dp[i, w:] = np.maximum(dp[(i-1)//2, :-w]+v, dp[i, w:])

@njit("(i4[::], i4[::], i4, i4)", cache = True)
def func(vs, ws, V, L):
    bits = np.arange(1 << len(vs))
    values = np.zeros_like(bits, np.int32)
    weights = np.zeros_like(bits, np.int32)
    for i in range(len(vs)):
        indices = np.nonzero(np.bitwise_and(bits, 1<<i))
        values[indices] += vs[i]
        weights[indices] += ws[i]

    mask = (weights <= L)     
    print(np.amax(dp[V][L - weights[mask]] + values[mask]))


Q = int(input())
for _ in range(Q):
    V, L = map(int, input().split())
    V -= 1
    if V < n:
        print(dp[V][L])
    else:
        vws_choose = []
        while V >= n:
            vws_choose.append(vws[V])
            V = (V-1) // 2
        vs, ws = zip(*vws_choose)
        func(np.array(vs, np.int32), np.array(ws, np.int32), V, L)


### FIXED CODE ###

print(input()[:3])
turn=int(input())
ten=[0,0]

for _ in range(turn):
    hikaku = list(map(int,input().split()))
    if hikaku[0] < hikaku[1]:
        ten[1] +=3

    elif hikaku[0] > hikaku[1]:
        ten[0] +=3

    else:
        ten[0]+=1
        ten[1]+=1

print(" ".join(map(str,ten)))

### FIXED CODE ###

turn=int(input())
ten=[0,0]

for _ in range(turn):
    hikaku = input().split()
    if hikaku[0] < hikaku[1]:
        ten[1] +=3

    elif hikaku[0] > hikaku[1]:
        ten[0] +=3

    else:
        ten[0]+=1
        ten[1]+=1

print(" ".join(map(str,ten)))
while True:
  if raw_input() == '0 0':
    break
  x, y = sorted(map(int, raw_input().split()))
  print '{0} {1}'.format(x, y)

### FIXED CODE ###

while True:
  x, y = sorted(map(int, raw_input().split()))
  if x ==0 and y == 0:
    break
  print '{0} {1}'.format(x, y)
a,b=map(int,input().split())
print(if (a*b)%2==Even: else Odd)

### FIXED CODE ###

a,b=map(int,input().split())
print("Even" if a*b%2==0 else "Odd")
n, m, k = list(map(int, input().split()))
a = list(map(int, input().split()))
b = list(map(int, input().split()))

a_=[]
b_=[]
tmp = 0
for i in a:
    tmp += i
    a_.append(tmp)
tmp = 0
for i in b:
    tmp += i
    b_.append(tmp)

if a_[0]>k and b_[0]>k:
    print(0)
    exit()

if a_[0]>k:
    asn=0
    for i in b_:
        asn+=1
        if i > k:
            print(asn)
            exit()

if b_[0]>k:
    asn=0
    for i in a_:
        asn+=1
        if i > k:
            print(asn)
            exit()


ans=0
j = m-1
for i in range(n):
    if a_[i] > k:
        continue
    while b_[j] + a_[i] > k:
        j -= 1
    ans = max(ans,i+j+2)
print(ans)


### FIXED CODE ###

import sys
n, m, k = list(map(int, input().split()))
a = list(map(int, input().split()))
b = list(map(int, input().split()))

a_=[0]
b_=[0]
tmp = 0
for i in a:
    tmp += i
    a_.append(tmp)
tmp = 0
for i in b:
    tmp += i
    b_.append(tmp)

ans=0
j = m
for i in range(n+1):
    if a_[i] > k:
        continue
    while b_[j] + a_[i] > k:
        j -= 1
    ans = max(ans,i+j)
print(ans)
from itertools import combinations

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

c = [0] * (10 ** 9 + 1)
for e in a:
    c[e] += 1

for x, y in combinations(a, 2):
    t = [0] * (10 ** 9 + 1)
    i, j = x, y
    t[i] += 1
    t[j] += 1
    for _ in range(N - 2):
        k = i ^ j
        t[k] += 1
        if t[k] > c[k]:
            j = -1
            break
        i, j = j, k
    if j ^ x == y:
        print('Yes')
        exit()
print('No')


### FIXED CODE ###

from itertools import product

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

c = {}
for e in a:
    c.setdefault(e, 0)
    c[e] += 1

if len(set(c)) > 3:
    print('No')
    exit()

t = {}
for x, y in product(set(c), repeat=2):
    i = x
    j = y
    t[i] = 1
    if t[i] > c[i]:
        continue
    t.setdefault(j, 0)
    t[j] += 1
    if t[j] > c[j]:
        continue
    for _ in range(N - 2):
        k = i ^ j
        t.setdefault(k, 0)
        t[k] += 1
        c.setdefault(k, 0)
        if t[k] > c[k]:
            j = -1
            break
        i, j = j, k
    if j ^ x == y:
        print('Yes')
        exit()
print('No')
S = input()
T = in@ut()

if(S==T[:-1]):
  print("Yes")
else:
  print("No")

### FIXED CODE ###

S = input()
T = input()
 
if(S==T[:-1]):
  print("Yes")
else:
  print("No")
N = int(input())
p = [0] * N
for i in range(N):
  p[i]=int(input())
  
p = sorted(p,reverse=True)
ans += p.pop(0) / 2 +sum(p)
print(ans)

### FIXED CODE ###

N = int(input())
p = [0] * N
for i in range(N):
  p[i]=int(input())
  
p = sorted(p,reverse=True)
ans = p.pop(0) / 2 +sum(p)
print(int(ans))
from sys import stdin,setrecursionlimit
from collections import deque
h,w = [int(x) for x in stdin.readline().rstrip().split()]
li = [["" for i in range(w)]for j in range(h)]
point = 0
for i in range(h):
    s = stdin.readline().rstrip()
    point += s.count(".")
    for j in range(w):
        li[i][j] = s[j]
dx = [1,0,-1,0]
dy = [0,1,0,-1]
que = deque()
lin = [[inf for i in range(w)]for j in range(h)]
lin[0][0] = 0#ここをスタートの座標に変えること
que.append([0,0])

### FIXED CODE ###

from queue import deque

h,w = map(int,input().split())
li = [input() for _ in range(h)]

inf = 10**10
dx = [1,0]
dy = [0,1]
que = deque()

#そのマスにたどり着くまでに色が変わった最小の回数を保存するリスト
flip_count = [[inf for i in range(w)]for j in range(h)]

if li[0][0] == "#":
    flip_count[0][0] = 1
else:
    flip_count[0][0] = 0

que.append([0,0])

while que:
    k = que.popleft()
    x = k[0]
    y = k[1]
    for i,j in zip(dx,dy):
        nx = x + i
        ny = y + j
        if nx >= w or ny >= h:
            continue
        if flip_count[ny][nx] == inf:
            que.append([nx,ny])
        if li[ny][nx] != li[y][x]:
            flip_count[ny][nx] = min(flip_count[ny][nx],flip_count[y][x]+1)
        else:
            flip_count[ny][nx] = min(flip_count[ny][nx],flip_count[y][x])

if li[-1][-1] == "#":
    flip_count[-1][-1] += 1

print(flip_count[-1][-1]//2)
import math

n = int(input())
sum = list(map(int,input().split()))
x = 1

for i in range(n):
    x *= sum[i]

if math.log(x,10)>18:
    print(-1)
    
else:
    print(x)

### FIXED CODE ###

N=int(input())
number=list(map(int,input().split()))
ans=1
if 0 in number:
    print(0)
    exit(0)
    
for i in range(N):
    ans *= number[i]
    if ans>1000000000000000000:
        print(-1)
        exit(0)
print(ans)
a=int(input())
b=int(input())

c=(a+b-1)/2+1
print(int(c))

### FIXED CODE ###

a, b=map(int,input().split())
print((a+b+1)//2)
a, b, c = [int(i) for i in input().split())

total = 0 
for d in range(a, b + 1): 

    if c % d == 0:
        total += 1

print(total)

### FIXED CODE ###

a, b, c = [int(i) for i in input().split()]
 
total = 0
for d in range(a, b + 1):
    if c % d == 0:
        total += 1
 
print(total)
n = int(input())
A=[]
for i in range(n):
  A.append(list(input().split())

ans=0
for a in A:
    if a[1] =="JPY":
        ans += float(a[1])
    else:
        ans += float(a[0]) * 380000.0
print(ans)

### FIXED CODE ###

n = int(input())
A=[]
for i in range(n):
  A.append(list(input().split()))
 
ans=0
for a in A:
    if a[1] =="JPY":
        ans += float(a[0])
    else:
        ans += float(a[0]) * 380000.0
print(ans)
import numpy as np
from math import factorial
import math, sys

N, M = map(int, input().split())
A = [None]*M

for i in range(M):
    A[i] = int(input())

tmp = 0
x = []

for i, a in enumerate(A):
    x.append(a-tmp-1)
    tmp = a + 1

x.append(N - tmp)
    
x = np.array(x)
if x[1:].min()<1:
    print(0)
    sys.exit()

def calc_combi(a):
    ans = 0
    for i in range(int(a/2)+1):
        tmp_n = math.ceil(a/2)+i
        tmp_r = a - tmp_n
        ans += factorial(tmp_n) // factorial(max(tmp_r, tmp_n - tmp_r))                        
    return ans

memo =  list(map(lambda x: calc_combi(x), x))

ans = 1
for m in memo:
    ans = ans * m % 1000000007

print(ans)

### FIXED CODE ###

N, M = map(int, input().split())
A = [None]*M

is_broken = [False] * (N+1)

for i in range(M):
    A[i] = int(input())
    is_broken[A[i]] = True

dp = [0] * (N+1)
dp[0] = 1

for i in range(1, N+1):
    if is_broken[i]:
        continue
    dp[i]  = (dp[i-1] + dp[i-2]) % (10**9 + 7)

print(dp[-1])
N=int(input())
ans=[0 for _ in range(10000)]
for x in range(1,100):
    for y in range(1,100):
        for z in range(1,100):
            v=x**2+y**2+z**2+x*y+y*z+z*x
            if v<10050:
                ans[v]+=1

for i in range(N):
    print(ans[i])

### FIXED CODE ###

N=int(input())
ans=[0 for _ in range(10050)]
for x in range(1,105):
    for y in range(1,105):
        for z in range(1,105):
            v=x**2+y**2+z**2+x*y+y*z+z*x
            if v<10050:
                ans[v]+=1

for i in range(N):
    print(ans[i+1])
x=input()
if x == 7 or x == 5 or x == 3:
print("YES")
else:
print("NO")

### FIXED CODE ###

x=int(input())
if x == 7 or x == 5 or x == 3:
	print("YES")
else:
	print("NO")
a = int(input())
b = int(input())

if a > b:
    print("GREATER")
elif a < b:
    print("LESS")
else:
    print("EQUAL")
    

### FIXED CODE ###

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

res = "".join([a[0].upper(), b[0].upper(), c[0].upper()])
print(res)
N = input()
K = int(input())

digit = len(N)
dp = [[[0]*(digit+1) for _ in range(2)] for _ in range(digit)]

cd = int(N[0])
dp[0][0][0] = 0
dp[0][0][1] = 1
dp[0][1][0] = 1
dp[0][1][1] = cd-1

for i in range(1, digit):
    for k in range(i+2):
        cd = int(N[i])
        if k == 0:
            dp[i][1][0] = 1
        else:
            dp[i][0][k] = dp[i-1][0][k-1]
            dp[i][1][k] = dp[i-1][0][k-1]*(cd-1)+dp[i-1][0][k]\
                          +dp[i-1][1][k]+dp[i-1][1][k-1]*9


print(dp[-1][0][K]+dp[-1][1][K])

### FIXED CODE ###

N = input()
K = int(input())

digit = len(N)
dp = [[[0]*(K+1) for _ in range(2)] for _ in range(digit)]

cd = int(N[0])
dp[0][0][0] = 0
dp[0][0][1] = 1
dp[0][1][0] = 1
dp[0][1][1] = cd-1

for i in range(1, digit):
    for k in range(K+1):
        cd = int(N[i])
        if k == 0:
            dp[i][1][0] = 1
        else:
            if cd == 0:
                dp[i][0][k] = dp[i-1][0][k]
                dp[i][1][k] = dp[i-1][1][k] + dp[i-1][1][k-1]*9
            else:
                dp[i][0][k] = dp[i - 1][0][k - 1]
                dp[i][1][k] = dp[i-1][0][k-1]*(cd-1)+dp[i-1][0][k]\
                          +dp[i-1][1][k]+dp[i-1][1][k-1]*9


print(dp[-1][0][K]+dp[-1][1][K])
N, L = map(int,input().split())
S = sorted([input() for i in range(n)])
print(*S, sep="")

### FIXED CODE ###

a, b = map(int, input().split())
list = []
for i in range(a):
  word = input()
  list.append(word)
  
c = sorted(list)
d = ""
for j in range(a):
  d += c[j]
print(d)
N = int(input())

print(sum(N))

### FIXED CODE ###

N = int(input())

print(sum(range(N+1)))