<image>

Input

The input contains two integers row, col (0 ≤ row, col ≤ 63), separated by a single space.

Output

Output "IN" or "OUT".

Examples

Input


0 0


Output


OUT


Input


27 0


Output


IN


Input


0 27


Output


OUT


Input


27 27


Output


IN
def precomp():
    import sys
    sys.setrecursionlimit(10**7)

    from PIL import Image
    img = Image.open("img.png")
    N, M = img.size
    G = [[img.getpixel((x,y)) == (255,255,255) for y in range(M)] for x in range(N)]

    isOut = [[False for y in range(M)] for x in range(N)]
    def dfs(x, y):
        if not (0 <= x < N and 0 <= y < M): return
        if not G[x][y]: return
        if isOut[x][y]: return
        isOut[x][y] = True
        dfs(x-1, y)
        dfs(x+1, y)
        dfs(x, y-1)
        dfs(x, y+1)
    for x in [0,N-1]:
        for y in [0,M-1]:
            dfs(x,y)
    s = '\n'.join(
        ''.join(
            '1' if isOut[i*15+7][j*15+7] else '0'
            for j in range(64)
        )
        for i in range(64)
    )
    print(s)

#precomp()
INP = """
1111111111111111111111111100000000000011111111111111111111111111
1111111111111111111111000000000000000000001111111111111111111111
1111111111111111111100000000000000000000000011111111111111111111
1111111111111111101100000000000000000000000000011111111111111111
1111111111111111001110000000000000000000000000001111111111111111
1111111111111100000110000000000000000000000000000011111111111111
1111111111111000000111000000000000000000000000000001111111111111
1111111111100000000011000000000000000000000000000000011111111111
1111111111000000000011100000000000000000000000000000001111111111
1111111110000000000001100000000000000000000100000000000111111111
1111111100000000000001110100000000000000000111100000000011111111
1111111000000000000000110101110100000000000001000000000001111111
1111111000000000000000110111011100100000000011111000000001111111
1111110000000000000000011101010110110000000000010000000000111111
1111100000000000000000110100010011100000000001111010000000011111
1111110000000000000000100001011010110000000001001110000000011111
1111011000000000000001111111000010011000000001100011100000001111
1110001100000000000001010100010111001010000000110110110000000111
1110100000000000000011000111110100011110000000010100011000000111
1110111000000000000110010010000001010100000000110001010000000111
1100101100000000000100111000011111110110000000011111000000000011
1101100000000000000111101011010101000010000000110101101000000011
1000101010000000000010001110000001101110000000100000101100000001
1111101110000000000111011000101100001010000000110110001000000001
1000001010000000000101001010100111111000000000010100111110000001
1011111010000000000001100011110100010000000000011110010010000001
0010001000000000000000110110100001111000011000110010111010000000
1110101110000000000000010100001011000000001000010111100010000000
0000100010000000000000011110101001100000111001110010101000000000
1110111011000000000000001011111101001110010011011000001100000000
0010100010000000000000000000010000000100111110001011011000000000
0111101110000000000000000000111111010111101011100010001000000000
0001001000000000000000000000000100011101001000110111101110000000
0101011010000000000000000000110001110101100000010000111011000000
0111000010000000000000000001100011000001000000111011100010000000
0000010110000000000000000000111010011000000000001001001110000000
1110110100000000000000000011101111110000000000101111101000000000
0010100111000000000000001110001010000000000000111010001110000000
1010111101000000000000111000111011101000000000010011011010000001
1011101000000000000110001110001000111000000000110110000010000001
1000000010000000000100100011100010010000000000010000101110000001
1011110110000000000111111000110111111100000000011101100100000001
1110011100000000000010001010000100010100000000110101000000000011
1100110001000000000110100010110001000110000001100111110000000011
1110000111000000000011101010011111010010000000110100100000000111
1111111100000000000110101111000001111110000000000110100000000111
1110010000000000000010001001011000100100000000010010000000000111
1111000110000000000011011100010010001110000000111110000000001111
1111111100000000000001110110110111011010000000100100000000011111
1111100110000000000000100100100100010000000001101100000000011111
1111110010000000000001110001110110111000000000100000000000111111
1111111000000000000000111101010011101000000001110000000001111111
1111111000000000000000110111000110100000000001000000000001111111
1111111100000000000001110010011100000000000011100000000011111111
1111111110000000000001100111110110000000000001000000000111111111
1111111111000000000001100000000000000000000000000000001111111111
1111111111100000000011100000000000000000000000000000011111111111
1111111111111000000011000000000000000000000000000001111111111111
1111111111111100000011000000000000000000000000000011111111111111
1111111111111111000111000000000000000000000000001111111111111111
1111111111111111100110000000000000000000000000011111111111111111
1111111111111111111110000000000000000000000011111111111111111111
1111111111111111111111000000000000000000001111111111111111111111
1111111111111111111111111100000000000011111111111111111111111111
""".split()

ROW, COL = map(int,input().split())
print({"1":"OUT", "0":"IN"}[INP[COL][ROW]])
