Harryxun/stf_run huggingface dataset:
import sys
input = sys.stdin.readline
N, M, Q = map( int, input().split())
NN = [ [ 0 for _ in range(N+1)] for _ in range(N+1)]
for _ in range(M):
    L, R = map( int, input().split())
    NN[L][R] += 1
Sum = [ [ 0 ] for _ in range(N+1)]
for i in range(1,N+1):
    for j in range(1,N+1):
        Sum[i].append(Sum[i][-1]+NN[i][j])
for _ in range(Q):
    p, q = map(int, input().split())
    ans = 0
    for i in range(p,q+1):
        ans += Sum[i][q] - Sum[i][p-1]
    print(ans)

### FIXED CODE ###

A, B = map( int, input().split())
print(A*B - A - B + 1)
/home/hiroya/.pyenv/versions/anaconda3-5.3.1/bin/python /home/hiroya/06_coding/aaa.py
4 4
1152

Process finished with exit code 0


### FIXED CODE ###

import math
n,m=map(int,input().split())
mod=10**9+7
if abs(n-m)>1:
    print(0)
elif abs(n-m)==1:
    print(math.factorial(n)*math.factorial(m)%mod)
else:
    print(2*math.factorial(n)*math.factorial(m)%mod)
a,b,c,x,y = map(int, input().split())
only = a * x + b * y 
ans = only
for i in range(1,x + 1):
    current = 0
    current = c * i * 2
    if y - i >= 0:
        current = current + a * ( x - i ) + b * (y - i)
    else:
        current = current + a * ( x - i )
    if ans > current:
        ans = currents
for i in range(1,y + 1):
    current = 0
    current = c * i * 2
    if x - i >= 0:
        current = current + a * ( x - i ) + b * ( y - i )
    else:
        current = current + b * ( y - i )
    if ans > current:
        ans = current
print(ans)

### FIXED CODE ###

a,b,c,x,y = map(int, input().split())
only = a * x + b * y 
ans = only
for i in range(1,x + 1):
    current = 0
    current = c * i * 2
    if y - i >= 0:
        current = current + a * ( x - i ) + b * (y - i)
    else:
        current = current + a * ( x - i )
    if ans > current:
        ans = current
for i in range(1,y + 1):
    current = 0
    current = c * i * 2
    if x - i >= 0:
        current = current + a * ( x - i ) + b * ( y - i )
    else:
        current = current + b * ( y - i )
    if ans > current:
        ans = current
print(ans)
N=int(input())
A=list(map(int,input()))
a=0
s=[]
for i in range(A):
  if i<a:
    s.append(i-a)
    a=i
print(sum(s))
      
  
    

### FIXED CODE ###

N=int(input())
A=list(map(int,input().split()))
a=0
s=[]
for i in A:
  if i<a:
    s.append(a-i)
    
  else:
    a=i
print(sum(s))
N=int(input())
A=[int(i) for i in input().split()]
A.sort()
miss=0
if N%2==0:
    for i in range(int(N/2)):
        if miss==1:
            
        for j in range(2):
            if A[0]==2*i+1:
                A.pop(0)
            else:
                miss=1
                
    if miss==1:
        print(0)
    else:
        print(int((2**int(N/2))%(10e9+7)))

if N%2==1:
    if A[0]!=0:
        miss=1
        A.pop(0)
    else:
        A.pop(0)
    for i in range(int((N-1)/2)):
        if miss==1:
            
        for j in range(2):
            if A[0]==2*i+2:
                A.pop(0)
            else:
                miss=1
                
    if miss==1:
        print(0)
    else:
        print(int((2**int((N-1)/2))%(10e9+7)))



### FIXED CODE ###

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

if N%2==0:
    for i in range(int(N/2)):    
        if miss==1:
            break
        for j in range(2):
            if A[0]==2*i+1:
                A.pop(0)
            else:
                miss=1
                break
                
    if miss==1:
        print(0)
    else:
        print(int((2**int(N/2))%(10**9+7)))

else:
    if A[0]!=0:
        miss=1
        A.pop(0)
    else:
        A.pop(0)
    for i in range(int((N-1)/2)):
        if miss==1:
            break
        for j in range(2):
            if A[0]==2*i+2:
                A.pop(0)
            else:
                miss=1
                break
                
    if miss==1:
        print(0)
    else:
        print(int((2**int((N-1)/2))%(10**9+7)))
a,b = int(input())
num = a*b
if num % 2 ==0:
    print("Even")
else print("Odd")  

### FIXED CODE ###

a,b=map(int,input().split())
if(a*b % 2 == 0):
  print('Even')
else:
  print('Odd')
t,x=map(int,inpyt().split())
print(t/x)

### FIXED CODE ###

t,x=map(int,input().split())
print(t/x)
h, w, m = (int(x) for x in input().split())
bomb = [[0]*w for i in range(h)]
bomb_h = [0]*h
bomb_w = [0]*w
for i in range(m):
    hm, wm = (int(x) for x in input().split())
    hm-=1
    wm-=1
    bomb[hm][wm] = 1
    bomb_h[hm]+=1
    bomb_w[wm]+=1
h_kouho = []
w_kouho = []
h_max = max(bomb_h)
w_max = max(bomb_w)
for i in range(h):
    if bomb_h[i]==h_max:
        h_kouho.append(i)
for i in range(w):
    if bomb_w[i]==w_max:
        w_kouho.append(i)
boo = False
for i in h_kouho:
    for j in w_kouho:
        if bomb[i][j]==0:
            boo=True
            break
    else:
        continue
    break
if boo:
    print(h_max+w_max)
else:
    print(h_max+w_max-1) 


### FIXED CODE ###

h, w, m = (int(x) for x in input().split())
bomb = {}
bomb_h = [0]*h
bomb_w = [0]*w
for i in range(m):
    hm, wm = (int(x) for x in input().split())
    hm-=1
    wm-=1
    bomb[(hm, wm)] = 0
    bomb_h[hm]+=1
    bomb_w[wm]+=1
h_kouho = []
w_kouho = []
h_max = max(bomb_h)
w_max = max(bomb_w)
for i in range(h):
    if bomb_h[i]==h_max:
        h_kouho.append(i)
for i in range(w):
    if bomb_w[i]==w_max:
        w_kouho.append(i)
boo = False
for i in h_kouho:
    for j in w_kouho:
        if (i, j) not in bomb:
            boo=True
            break
    else:
        continue
    break
if boo:
    print(h_max+w_max)
else:
    print(h_max+w_max-1)
import pdb

def eat(n, x):
    ret = 0

    if x == 0:
        return 0, x

    if n == 0:
        x -= 1
        return 1, x

    if allnum[n] <= x:
        x -= allnum[n]
        return pnum[n], x
        
    
    x -= 1 # eat bread
    if x == 0:
        return 0, x

    # eat n-1 beager
    tmp, x = eat(n - 1, x)
    ret += tmp
    if x == 0:
        return ret, x

    # eat patty
    x -= 1
    ret += 1
    if x == 0:
        return ret, x

    # eat n-1 beager
    tmp, x = eat(n - 1, x)
    ret += tmp
    if x == 0:
        return ret, x

    x -= 1 # eat bread
        
    return ret, x


def main():
    tmp = input().split()
    n = int(tmp[0])
    x = int(tmp[1])
    global pnum
    global allnum
    pnum = [1]
    allnum = [1]
    for i  in range(1, 52):
        pnum.append(pnum[i-1] * 2 + 1)
        allnum.append(allnum[i-1] * 2 + 3)

    ans, tmp = eat(n, x)

    print("%d" % ans)

        
if __name__ == '__main__':
    main()


### FIXED CODE ###

import pdb


def main():
    num = int(input())

    ans = ""
    
    if num == 25:
        ans = "Christmas"
    elif num == 24:
        ans = "Christmas Eve"
    elif num == 23:
        ans = "Christmas Eve Eve"
    elif num == 22:
        ans = "Christmas Eve Eve Eve"
        
    print(ans)

        
if __name__ == '__main__':
    main()
import numpy as np
N=int(input())
S=input()
r = sum(S == "R")
g = sum(S == "G")
b = sum(S == "B")

ans = r * g * b

for i in range(N):
  for k in [N - k_ - 1 for k_ in range(N)]:
    tar_j = i + k
    if (tar_j > 2 * i) & (tar_j < 2 * k):
      if np.mod(tar_j, 2) == 0:
        j = tar_j / 2
        s = S[i] + S[j] + S[k]
        if ("R" in s) & ("G" in s) & ("B" in s):
          ans -= 1
    else:
      break
print(ans)
          

### FIXED CODE ###


#S = "RBRBGRBGGBBRRGBBRRRBGGBRBGBRBGBRBBBGBBB"# * 1000
#N = len(S)

N=int(input())
S=input()
r = len(S.replace("G", "").replace("B", ""))
g = len(S.replace("R", "").replace("B", ""))
b = N - r - g
 
ans = r * g * b
 
is_break = False
for i in range(N):
    for j in range(i, int((N+i)/2 + 1)):
        k = 2 * j - i
        if k < N:
            s = S[i] + S[j] + S[k]
            if ("R" in s) & ("G" in s) & ("B" in s):
                    ans -= 1

print(ans)
a = int(input())
s = int(input())
if a >= 3200:
        print(s)
else:
        print("red")

### FIXED CODE ###

a = int(input())
s = input()
if a >= 3200:
        print(s)
else:
        print("red")
N,M,Q = map(int,input().split())
t,ans = [[0 for j in range(N+1)] for i in range(N+1)],[[-1 for j in range(N+1)] for i in range(N+1)]
def solve(x, y):
	global ans,N,t
	if x > N or y == 0:
		return 0
	elif ans[x][y] != -1:
		return ans[x][y]
	else:
		ans[x][y] = solve(x,y-1) + solve(x+1,y) - solve(x+1,y-1) + t[x][y]
		return ans[x][y]
for i in range(M):
	l,r = map(int,input().split())
	t[l][r] += 1
for i in range(Q):
	p,q = map(int,input().split())
	print(solve(p,q))



### FIXED CODE ###

n,m,q=map(int,input().split())
d=[[0 for j in range(n)] for i in range(n)]
for i in range(m):
	l,r=map(lambda x:int(x)-1,input().split())
	d[l][r]+=1
for l in range(n):
	for r in range(1,n):
		d[l][r]+=d[l][r-1]
for l in range(n-1,0,-1):
	for r in range(n):
		d[l-1][r]+=d[l][r]
for i in range(q):
	l,r=map(lambda x:int(x)-1,input().split())
	print(d[l][r])
s=list(map(input().split()))

ans=[]



### FIXED CODE ###

s=list(input())
r=0
l=0
ans=[]
for i,x in enumerate(s):
  if s[i]=='R':
    if s[i-1]=='L'and i>0:
      migi=(r+1)//2+l//2
      hidari=r//2+(l+1)//2
      ans+=[0]*(r-1)+[migi,hidari]+[0]*(l-1)
      r=1
      l=0
    else:r+=1
  else:
    l+=1
migi=(r+1)//2+l//2
hidari=r//2+(l+1)//2
ans+=[0]*(r-1)+[migi,hidari]+[0]*(l-1)
    
print(*ans)
N = int(input())

class edge():
    def __init__(self,_to,_cost):
        self.to = _to;
        self.cost = _cost;

tree = [[]for i in range(N)]

for i in range(N-1):
    a,b,c = list(map(int, input().split()))
    a = a - 1
    b = b - 1
    tree[a].append(edge(b,c))
    tree[b].append(edge(a,c))

Q, K = list(map(int, input().split()))
K = K - 1
depth = [0]*N

def DFS(v,p,d):
    depth[v] = d
    for e in tree[v]:
        if e.to==p :
            continue
        DFS(e.to, v, d + e.cost)

DFS(K,-1,0)

for q in range(Q):
    x,y = list(map(int, input().split()))
    x = x - 1
    y = y - 1
    print(depth[x] + depth[y])


### FIXED CODE ###

import sys;sys.setrecursionlimit(int(1e7))

class edge():
    def __init__(self,_to,_cost):
        self.to = _to;
        self.cost = _cost;

N = int(input())
tree = [[] for i in range(N+1)]

for i in range(N-1):
    a,b,c = map(int,input().split())
    a = a - 1
    b = b - 1
    tree[a].append(edge(b,c))
    tree[b].append(edge(a,c))
Q,K = map(int,input().split())
K = K - 1
depth = [None]*N

def DFS(v,p,d):
    depth[v] = d
    for e in tree[v]:
        if e.to == p:
            continue
        DFS(e.to, v, d + e.cost)
DFS(K,-1,0)

for _ in range(Q):
    x,y = map(int, input().split())
    x = x - 1
    y = y - 1
    print(depth[x] + depth[y])
n=int,input(4)
k=int,input(3)
s=input(CABA)
S=s[0:k-1]+s[k-1].lower()+s[k:]
print(S)


### FIXED CODE ###

n,k=map(int,input().split())
s=input()
S=s[0:k-1]+s[k-1].lower()+s[k:]
print(S)
a = int(input())
b = int(input())
c = int(input())
d = int(input())
 
if c - a <= d:
    print("Yes")
elif b - a <= d and c - b <= d:
    print("Yes")
else:
    print("No"

### FIXED CODE ###

a,b,c,d = map(int,input().split())
 
if abs(a - c) <= d or abs(b - a) <= d and abs(c - b) <= d:
    print("Yes")
else:
    print("No")
from math import sqrt,pi,acos
n = int(input())
p1 = [[int(i) for i in input().split()] for i in range(n)]
p,q,ans = sorted(p1),[],[]
x1,x2,y1,y2,z1,z2 = p[0][0],p[0][1]+1,p[0][0],p[0][1],10**6+1,0
def cos(a,b,c,d,e,f):
	a,b,e,f = a-c,b-d,e-c,f-d
	return (a*e+b*f)/(sqrt(a**2+b**2)*sqrt(e**2+f**2))
while p[0]!=[z1,z2]:
	q.append([y1,y2])
	num = 2
	for i,j in p:
		if y1!=i or y2!=j:
			m = cos(x1,x2,y1,y2,i,j)
			if num>m: num,z1,z2 = m,i,j
	ans.append((pi-acos(num))/(2*pi))
	x1,x2,y1,y2 = y1,y2,z1,z2
ans = [(pi-acos(cos(x1,x2,y1,y2,q[1][0],q[1][1])))/(2*pi)]+ans[1:]
for i in p1:
	if i in q: print(ans[q.index(i)])
	else: print(0)

### FIXED CODE ###

from math import sqrt,pi,acos
n = int(input())
p1 = [[int(i) for i in input().split()] for i in range(n)]
p,q,ans = sorted(p1),[],[]
x1,x2,y1,y2,z1,z2 = p[0][0],p[0][1]+1,p[0][0],p[0][1],10**6+1,0
def cos(a,b,c,d,e,f):
	a,b,e,f = a-c,b-d,e-c,f-d
	return (a*e+b*f)/(sqrt(a**2+b**2)*sqrt(e**2+f**2))
while p[0]!=[z1,z2]:
	q.append([y1,y2])
	num = 2
	for i,j in p:
		if y1!=i or y2!=j:
			m = cos(x1,x2,y1,y2,i,j)
			if num>m: num,z1,z2 = m,i,j
	ans.append((pi-acos(max(-1,num)))/(2*pi))
	x1,x2,y1,y2 = y1,y2,z1,z2
ans = [(pi-acos(cos(x1,x2,y1,y2,q[1][0],q[1][1])))/(2*pi)]+ans[1:]
for i in p1:
	if i in q: print(ans[q.index(i)])
	else: print(0)
N = int(input())

A = []

x = []
y = []

for i in range(N):
    temp = int(input())
    A.append(temp)
    temp3 = []
    temp4 = []
    for j in range(temp):
        temp1,temp2 = map(int,input().split())
        temp3.append(temp1)
        temp4.append(temp2)
    x.append(temp3)
    y.append(temp4)

allperson = set(range(N))

res = [0]

for i in range(N):
    honest = {i}
    dishonest = set()
    checked = set()
    temp1 = A[i]
    for j in range(temp1):
        if y[i][j] == 1:
            honest.add(x[i][j]-1)
        elif y[i][j] == 0:
            dishonest.add(x[i][j]-1)

    temp2 = honest
    isOK = True

    while isOK:
        for k in temp2:
            temp3 = A[i]
            for l in range(temp3):
                if y[k][l] == 1:
                    if x[k][l]-1 in dishonest:
                        isOK = False
                        break
                    else:
                        honest.add(x[k][l]-1)
                elif y[k][l] == 0:
                    if x[k][l]-1 in honest:
                        isOK = False
                        break
                    else:
                        dishonest.add(x[k][l]-1)
            if isOK == False:
                break
            checked.add(k)
        if checked == honest:
            isOK = True
            break
        else:
            temp2 = honest - checked

    if isOK == True:
        temp4 = len(honest)
        res.append(temp4)
        # print(i)
        # print(temp4)
        # print(honest)

print(max(res))


### FIXED CODE ###

N = int(input())

A = []

x = []
y = []

for i in range(N):
    temp = int(input())
    A.append(temp)
    temp3 = []
    temp4 = []
    for j in range(temp):
        temp1,temp2 = map(int,input().split())
        temp3.append(temp1)
        temp4.append(temp2)
    x.append(temp3)
    y.append(temp4)

res = 0

for i in range(2 ** N):
    isOK = True
    honest = 0
    for j in range(N):
        if ((i >> j) & 1):
            honest += 1
            for k in range(A[j]):
                if (((i >> (x[j][k]-1)) & 1) ^ y[j][k]):
                    isOK = False
    if isOK:
        res = max(res,honest)

print(res)
import numpy as np
def main():
    N, M, Q = map(int, input().split())
    LR = []
    for i in range(M):
        l, r = map(int, input().split())
        LR.append([l-1, r])
    PQ = []
    for i in range(Q):
        p, q = map(int, input().split())
        PQ.append([p-1, q-1])
    ar = np.zeros([M, N])
    for m in range(M):
        ar[m, LR[m][0]:LR[m][1]] = 1
    flags_start = [np.ones(M, dtype=np.bool)]
    flags_end = []
    for i in range(1, N):
        flags_start.append((ar[:, :i].max(axis=1)==0))# * (ar[:, i:].max(axis=1)==1))
        flags_end.append((ar[:, i:].max(axis=1)==0))# * (ar[:, :i].max(axis=1)==1))
    flags_end.append(np.ones(M, dtype=np.bool))
    for q in range(Q):
        left = PQ[q][0]
        right = PQ[q][1]
        print(sum(flags_start[left] * flags_end[right]))

if __name__=='__main__':
    main()

### FIXED CODE ###


A, B = map(int, input().split())

print(A*B-A-B+1)
import sys

sys.setrecursionlimit(10 ** 9)

def dfs(v, n, graph, visited):
    all_visited = 1

    for i in range(n):
        if visited[i] == 0:
            all_visited = 0
            break

    if all_visited:
        return 1

    n_paths = 0

    for i in range(0, n):
        if not graph[v][i]:
            continue
        if visited[i]:
            continue

        visited[i] = 1
        n_paths += dfs(i, n, graph, visited)
        visited[i] = 0

    return n_paths


def main():
    n, m = [int(i) for i in input().split()]
    graph = [[0] * m for _ in range(m)]
    for _ in range(m):
        a, b = [int(i) for i in input().split()]
        graph[a-1][b-1] = 1
        graph[b-1][a-1] = 1

    visited = [0] * n

    visited[0] = 1
    n_paths = dfs(0, n, graph, visited)
    print(n_paths)


if __name__ == "__main__":
    main()


### FIXED CODE ###

import itertools


def main():
    n, m = [int(i) for i in input().split()]
    path_matrix = [[False] * n for _ in range(n)]
    for _ in range(m):
        a, b = [int(i) for i in input().split()]
        a -= 1
        b -= 1
        path_matrix[a][b] = True
        path_matrix[b][a] = True

    ans = 0
    for path in itertools.permutations(range(n), n):
        if path[0] != 0:
            continue
        for i in range(n):
            if i == n - 1:
                ans += 1
                break
            if not path_matrix[path[i]][path[i+1]]:
                break

    print(ans)


if __name__ == "__main__":
    main()
import math
N, A, B = map(int, input().split())
p = A*'b'+B*'r'
v = math.ceil(N/(A+B))
P = p * v
x = P[:N]
print(x.count('b'))

### FIXED CODE ###

N, A, B = map(int, input().split())
if A == 0:
    print(0)
    exit()
P = A + B
X = N//P
x = N%P

if x >= A:
    ans = A*X+A
elif x < A:
    ans = A*X+x

print(ans)
A, B, K = map(int, input().split())

r = list(range(A, B+1))
for i in sorted(set(r[:K]) | set(r[-K:])):
    print(i)


### FIXED CODE ###

a,b,k=map(int,input().split())
r=range(a,b+1)
for i in sorted(set(r[:k])|set(r[-k:])):print(i)
A,B,C = map(int,input().split())
if (A==B)and(B==C):
  print"Yes"
else:
  print"No"

### FIXED CODE ###

A,B,C = map(int,input().split())
if (A==B)and(B==C):
  print("Yes")
else:
  print("No")
import bisect, copy, heapq, math, sys
from collections import *
from functools import lru_cache
from itertools import accumulate, combinations, permutations, product
def input():
    return sys.stdin.readline()[:-1]
def ruiseki(lst):
    return [0]+list(accumulate(lst))
def celi(a,b):
    return -(-a//b)
sys.setrecursionlimit(5000000)
mod=pow(10,9)+7
al=[chr(ord('a') + i) for i in range(26)]
direction=[[1,0],[0,1],[-1,0],[0,-1]]

def main():
    h,w,m=map(int,input().split())
    hw=[list(map(int,input().split())) for i in range(m)]

    hlst=[(0,i) for i in range(h)]    
    wlst=[(0,i) for i in range(w)]
    dic={}
    for i in range(m):
        hh,ww=hw[i]
        hlst[hh-1][0]-=1
        wlst[ww-1][0]-=1
        dic[(hh-1,ww-1)]=1

    hlst.sort()
    wlst.sort()
    hkouho=[]
    wkouho=[]
    mi=0
    for i in range(h):
        if mi<hlst[i][0]:
            break
        hkouho.append(hlst[i][1])
        mi=hlst[i][0]
    mi=0
    for i in range(w):
        if mi<wlst[i][0]:
            break
        wkouho.append(wlst[i][1])
        mi=wlst[i][0]
    # print(hkouho)
    # print(wkouho)
    # print(hlst)
    for i in range(len(hkouho)):
        for j in range(len(wkouho)):
            if not (hkouho[i],wkouho[j]) in dic:
                print(-hlst[0][0]-wlst[0][0])
                exit()
    print(-hlst[0][0]-wlst[0][0]-1)
    # print(hkouho[0],wkouho[0])
main()

### FIXED CODE ###

import bisect, copy, heapq, math, sys
from collections import *
from functools import lru_cache
from itertools import accumulate, combinations, permutations, product
def input():
    return sys.stdin.readline()[:-1]
def ruiseki(lst):
    return [0]+list(accumulate(lst))
def celi(a,b):
    return -(-a//b)
sys.setrecursionlimit(5000000)
mod=pow(10,9)+7
al=[chr(ord('a') + i) for i in range(26)]
direction=[[1,0],[0,1],[-1,0],[0,-1]]

h,w,m=map(int,input().split())
hw=[list(map(int,input().split())) for i in range(m)]

hlst=[[0,i] for i in range(h)]    
wlst=[[0,i] for i in range(w)]
dic={}
for i in range(m):
    hh,ww=hw[i]
    hlst[hh-1][0]-=1
    wlst[ww-1][0]-=1
    dic[(hh-1,ww-1)]=1

hlst.sort()
wlst.sort()
hkouho=[]
wkouho=[]
mi=0
for i in range(h):
    if mi<hlst[i][0]:
        break
    hkouho.append(hlst[i][1])
    mi=hlst[i][0]
mi=0
for i in range(w):
    if mi<wlst[i][0]:
        break
    wkouho.append(wlst[i][1])
    mi=wlst[i][0]
# print(hkouho)
# print(wkouho)
# print(hlst)
for i in range(len(hkouho)):
    for j in range(len(wkouho)):
        if not (hkouho[i],wkouho[j]) in dic:
            print(-hlst[0][0]-wlst[0][0])
            exit()
print(-hlst[0][0]-wlst[0][0]-1)
# print(hkouho[0],wkouho[0])
s=list(input())
a=s.count("a")
b=s.count("b")
c=s.count("c")
if min(a,b,c)!=0 and max(a,b,c)-min(a,b,c)<=1:
    print("YES")
elif a+b+c=max(a,b,c) and max(a,b,c)==1:
    print("YES")
else:
    print("NO")


### FIXED CODE ###

s=list(input())
a=s.count("a")
b=s.count("b")
c=s.count("c")
l1=[a,b,c]
l1.sort()
if l1[0]==0 and l1[1]==1 and l1[2]==1:
    print("YES")
elif min(a,b,c)!=0 and max(a,b,c)-min(a,b,c)<=1:
    print("YES")
elif a+b+c==max(a,b,c) and max(a,b,c)==1:
    print("YES")
else:
    print("NO")
#C
import sys
sys.setrecursionlimit(100000)
mod=10**9+7
n,m=map(int,input().split())
a=[int(input()) for i in range(m)]
def f(x):
    if x==1 or x==0:
        return 1
    else:
        return (f(x-1)+f(x-2))%mod
s=f(a[0]-1)
for i in range(1,m):
    if a[i]-a[i-1]==1:
        print(0)
        break
    s=(s*f(a[i]-a[i-1]-2))%mod
else:
    s=(s*f(n-a[m-1]-1))%mod
    print(s)

### FIXED CODE ###

#C
mod=10**9+7
n,m=map(int,input().split())
a=[int(input()) for i in range(m)]
def f(x):
    b=1
    c=1
    if x==1 or x==0:
        return 1
    else:
        for i in range(x-1):
            b,c=(b+c)%mod,b
        return b
if m>=1:
    s=f(a[0]-1)
    for i in range(1,m):
        if a[i]-a[i-1]==1:
            print(0)
            break
        s=(s*f(a[i]-a[i-1]-2))%mod
    else:
        s=(s*f(n-a[m-1]-1))%mod
        print(s)
else:
    print(f(n))
# 証言が矛盾していないかチェックする
def check(bit):
  for i in range(n):
    if not bit & (1 << i):
      continue

      for human, is_honest in a[i]:
        if is_honest == 1 and (bit & (1 << human)):
          continue
          elif is_honest == 0 and not (bit & (1 << human)):
            continue
            else:
              return False
            return True

          n = int(input())
          ans = 0
          a = [[] for _ in range(n)]
          for i in range(n):
            m = int(input())
            for j in range(m):
              xy = list(map(int, input().split()))
              xy[0] -= 1
              a[i].append(xy)

              # 全パターン回す
              for bit in range((1 << n)):
                num = 0
                if check(bit):
                  for k in range(n):
                    if bit & (1 << k):
                      num += 1
                      ans = max(ans, num)
                      print(ans)


### FIXED CODE ###

import sys
input = sys.stdin.readline

def main():
    # 証言が矛盾していないかチェックする
    def check(bit):
        for i in range(n):
            if not bit & (1 << i):
                continue

            for human, is_honest in a[i]:
                if is_honest == 1 and (bit & (1 << human)):
                    continue
                elif is_honest == 0 and not (bit & (1 << human)):
                    continue
                else:
                    return False
        return True

    n = int(input())
    ans = 0
    a = [[] for _ in range(n)]
    for i in range(n):
        m = int(input())
        for j in range(m):
            xy = list(map(int, input().split()))
            xy[0] -= 1
            a[i].append(xy)

    # 全パターン回す
    for bit in range((1 << n)):
        num = 0
        if check(bit):
            for k in range(n):
                if bit & (1 << k):
                    num += 1
            ans = max(ans, num)
    print(ans)

if __name__ == '__main__':
    main()
S = input().split("/")
S[0] = "2018"
print(S.join("/"))


### FIXED CODE ###

S = input().split("/")
S[0] = "2018"
print("/".join(S))
import collections
import sys
import numpy as np
sys.setrecursionlimit(1000000000)
from heapq import heapify,heappop,heappush,heappushpop
MOD = 10**9+7
import itertools
import math

o = input()
e = input()
ans = ""
for i in range(len(o)):
    ans += o[i]+e[i]
print(ans)

### FIXED CODE ###

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

o = input()
e = input()
ans = ""
for i in range(len(e)):
    ans += o[i] + e[i]
if len(o)>len(e):
    ans += o[-1]
print(ans)