# coding: utf-8
# Your code here!
# coding: utf-8
from fractions import gcd 
from functools import reduce
import sys
sys.setrecursionlimit(200000000)
from inspect import currentframe


# my functions here!
#標準エラー出力
def printargs2err(*args):
    names = {id(v):k for k,v in currentframe().f_back.f_locals.items()}
    print(', '.join(names.get(id(arg),'???')+' : '+repr(arg) for arg in args),file=sys.stderr)






def printglobals():
    for (symbol, value) in globals().items():
        print('symbol="%s"、value=%s' % (symbol, value),file=sys.stderr)
def printlocals():
    for (symbol, value) in locals().items():
        print('symbol="%s"、value=%s' % (symbol, value),file=sys.stderr)
#入力（後でいじる）
def pin(type=int):
    return map(type,input().split())
     
#input
"""
def resolve():
    N,M=pin()
    ans=[1]+[0]*(N-1)
    check=[False]*3
    for i in range(M):
        p,m=pin()
        if p==1 and m!=0:
            if check[p-1]==False:
                ans[0]=m
                check[p-1]=True
            else:
                if ans[0]!=m:
                    print(-1)
                    return
        elif p==1 and m==0:
            print(-1)
            return
        elif p!=1:
            if check[p-1]==False:
                ans[p-1]=m
                check[p-1]=True
            else:
                if ans[p-1]!=m:
                    print(-1)
                    return
    a=""
    for i in range (M):
        a+=str(ans[i])
    print(int(a))
    #print(hint)
    
    #print([["NA","YYMM"],["MMYY","AMBIGUOUS"]][cMMYY][cYYMM])
#if __name__=="__main__":resolve()
"""
def resolve():
    bingo=[list(pin()) for i in range(3)]
    check=[[0]*3 for j in range(3)]
    N=int(input())
    for i in range(N):
        b=int(input())
        for h in range(3):
            for w in range(3):
                if bingo[h][w]==b:
                    check[h][w]=1
    for i in range(3):
        a=check[i][0]*check[i][1]*check[i][2]
        b=check[0][i]*check[1][i]*check[2][i]
        if a or b:
            print("Yes")
            return
    c,d=1,1
    for i in range(3):
        c*=check[i][i]
        d*=check[i][2-i]
    if c or d:
        print("Yes")
        return
    print("No")
    return
"""
#printデバッグ消した？
#前の問題の結果見てないのに次の問題に行くの？
"""
"""
お前カッコ閉じるの忘れてるだろ
"""

import sys
from io import StringIO
import unittest

class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)
    def test_入力例_1(self):
        input = """84 97 66
79 89 11
61 59 7
7
89
7
87
79
24
84
30"""
        output = """Yes"""
        self.assertIO(input, output)
    def test_入力例_2(self):
        input = """41 7 46
26 89 2
78 92 8
5
6
45
16
57
17"""
        output = """No"""
        self.assertIO(input, output)
    def test_入力例_3(self):
        input = """60 88 34
92 41 43
65 73 48
10
60
43
88
11
48
73
65
41
92
34"""
        output = """Yes"""
        self.assertIO(input, output)

if __name__=="__main__":resolve()

Measured memory_bytes: 83052