<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
from functools import reduce
import sys
# from PIL import Image

class Read:
    @staticmethod
    def string():
        return input()
 
    @staticmethod
    def int():
        return int(input())
 
    @staticmethod
    def list(delimiter=' '):
        return input().split(delimiter)
 
    @staticmethod
    def list_int(delimiter=' '):
        return list(map(int, input().split(delimiter)))

smile = [
'1111111111111111111111111101000000101011111111111111111111111111',
'1111111111111111111111000001011010101000101111111111111111111111',
'1111111111111111111101101111010011101110100011111111111111111111',
'1111111111111111101000101000011110000010101000011111111111111111',
'1111111111111111001010101111000011111010111111001111111111111111',
'1111111111111101011011100101101000100010000010011011111111111111',
'1111111111111001001001001100001110101111110110110001111111111111',
'1111111111100011101101100111100010001000100100100000011111111111',
'1111111111000110100100110010111011111011110000000000001111111111',
'1111111110000000000110000110000000100000000000000000000111111111',
'1111111100000000000000000000000000000000000000000000000011111111',
'1111111000000000000000000000000000000000000000000000000001111111',
'1111111000000000000000000000000000000000000000000000000001111111',
'1111110000000000000000000000000000000000000000000000000000111111',
'1111100000000000000000000000000000000000000000000000000000011111',
'1111100000000000000000000000000000000000000000000000000000011111',
'1111000000000000000000000000000000000000000000000000000000001111',
'1110000000000000000000000000000000000000000000000000000000000111',
'1110000000000000000000000000000000000000000000000000000000011111',
'1111100000000000001010111000000000000001101110000000000001111111',
'1111111100000000111111101000000000000000111011000000000111110011',
'1100111111100101100100100000000000000011101001110000011111000011',
'1000000111111111001110110100000000000110001100011101111100000001',
'1000000000111101100000100100000000011100100110110111110000000001',
'1000000000001000111101101110000000110001111100010010000000000001',
'1000000001011011101000001010000000011100010001110111110000000001',
'0000000001110001001111011011000000110111011011010001000000000000',
'0000000001011100011000010001010000100010001001011011100000000000',
'0000000001000111000010110101111010110111100001000000100000000000',
'0000000001101101110110100100101011100010001101101111100000000000',
'0000000000100000010100001111100010111000100100001001000000000000',
'0000000001110111000101100001000110100011101101100011100000000000',
'0000000001011101100100110111110010001001000100111110000000000000',
'0000000000001001001110100101011010111101011110100100000000000000',
'0000000000011100011000101101001000010101010100001111000000000000',
'0000000000000111001101111001101110000111000111011010000000000000',
'0000000000001101101000101100100100100101110001110000000000000000',
'0000000000000000111011100000001111100000010111000000000000000000',
'1000000000000001101110000000000010100000111101100000000000000001',
'1000000000000000000000000000011110000000000000000000000000000001',
'1000000000000000000000000000001011010000000000000000000000000001',
'1000000000000000000000000000000001110100000000000000000000000001',
'1100000000000000000000000000000111011100000000000000000000000011',
'1100000000000000000000000000000001000000000000000000011000000011',
'1110000000100000000000000000000011100000000000000001010000000111',
'1110000001111010000010000000000010110000000000011101110000000111',
'1110000000101111100111001011010110010100111010110101010000000111',
'1111000000001000110101111110011100111111101111100111000000001111',
'1111100000000010100000100011110001100010000100001101000000011111',
'1111100000000011101111101001000100001011101101101000000000011111',
'1111110000000000111010001111010111011110100100111100000000111111',
'1111111000000000000011100101110101001000001110010000000001111111',
'1111111000000000001110110001011100011101011000110000000001111111',
'1111111100000000000010000100001001000111000011100000000011111111',
'1111111110000000000000010111101111110101111001000000000111111111',
'1111111111000000000000110010100100100001010000000000001111111111',
'1111111111100000000000011110111100001111000000000000011111111111',
'1111111111111000000000000000001000000000000000000001111111111111',
'1111111111111100000000000000000000000000000000000011111111111111',
'1111111111111111000000000000000000000000000000001111111111111111',
'1111111111111111100000000000000000000000000000011111111111111111',
'1111111111111111111100000000000000000000000011111111111111111111',
'1111111111111111111111000000000000000000001111111111111111111111',
'1111111111111111111111111100000000000011111111111111111111111111'

]

# infilename = 'input.txt'
# sys.stdin = open(infilename, 'r')
# outfilename = 'output.txt'
# sys.stdout = open(outfilename, 'w')

def main():
    # img = Image.open("fff.png")
    # for i in range(64):
    #     for j in range(64):
    #         aa = str((img.getpixel((i*15 + 7, j*15 + 7))))
    #         dd = int(aa.split(',')[0][1:])
    #         print("1" if dd == 255 else "0", end="")
    #     print("")
    row, col = Read.list_int()
    print('OUT' if smile[row][::-1][col] == '1' else 'IN')

if __name__ == '__main__':
    main()
