<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
#include <bits/stdc++.h>
const char str[] =
    "11111111111111111111111111010100000010111111111111111111111111111111111111"
    "11111111111101000101010110100000111111111111111111111111111111111111111111"
    "00010111011100101111011011111111111111111111111111111111111110000101010000"
    "01111000010100010111111111111111111111111111111111001111110101111100001111"
    "01010100111111111111111111111111111111011001000001000100010110100111011010"
    "11111111111111111111111111100011011011111101011100001100100100100111111111"
    "11111111111111100000010010010001000100011110011011011100011111111111111111"
    "11110000000000001111011111011101001100100101100011111111111111111110000000"
    "00000000000001000000011000011000000000011111111111111111000000000000000000"
    "00000000000000000000000000000011111111111111100000000000000000000000000000"
    "00000000000000000000011111111111111000000000000000000000000000000000000000"
    "00000000000111111111111100000000000000000000000000000000000000000000000000"
    "00111111111110000000000000000000000000000000000000000000000000000001111111"
    "11100000000000000000000000000000000000000000000000000000011111111100000000"
    "00000000000000000000000000000000000000000000000011111110000000000000000000"
    "00000000000000000000000000000000000000011111111000000000000000000000000000"
    "00000000000000000000000000000111111111100000000000011101100000000000000111"
    "01010000000000000111111100111110000000001101110000000000000001011111110000"
    "00001111111111000011111000001110010111000000000000000100100110100111111100"
    "11100000001111101110001100011000000000001011011100111111111000000110000000"
    "00111110110110010011100000000010010000011011110000000001100000000000010010"
    "00111110001100000001110110111100010000000000011000000000111110111000100011"
    "10000000010100000101110110100000000100000000000010001011011011101100000011"
    "01101111001000111000000000000000000001110110100100010001000010100010000110"
    "00111010000000000000000000010000001000011110110101111010110100001110001000"
    "00000000000000000111110110110001000111010100100101101110110110000000000000"
    "00000000100100001001000111010001111100001010000001000000000000000000000111"
    "00011011011100010110001000011010001110111000000000000000000000011111001000"
    "10010001001111101100100110111010000000000000000000000010010111101011110101"
    "10101001011100100100000000000000000000000011110000101010101000010010110100"
    "01100011100000000000000000000000010110111000111000011101100111101100111000"
    "00000000000000000000000000111000111010010010010011010001011011000000000000"
    "00000000000000000011101000000111110000000111011100000000000000001000000000"
    "00000001101111000001010000000000011101100000000000000110000000000000000000"
    "00000000000111100000000000000000000000000001100000000000000000000000000010"
    "11010000000000000000000000000000011000000000000000000000000010111000000000"
    "00000000000000000000000111000000000000000000000000111011100000000000000000"
    "00000000000011110000000110000000000000000000100000000000000000000000000000"
    "00111110000000101000000000000000011100000000000000000000010000000111111000"
    "00001110111000000000001101000000000001000001011110000001111110000000101010"
    "11010111001010011010110100111001111101000000011111110000000011100111110111"
    "11110011100111111010110001000000001111111110000000101100001000010001100011"
    "11000100000101000000000111111111100000000001011011011101000010001001011111"
    "01110000000001111111111100000000111100100101111011101011110001011100000000"
    "00111111111111100000000010011100000100101011101001110000000000000111111111"
    "11111000000000110001101011100011101000110111000000000001111111111111110000"
    "00000111000011100010010000100001000000000000111111111111111110000000001001"
    "11101011111101111010000000000000011111111111111111110000000000001010000100"
    "10010100110000000000001111111111111111111110000000000000111100001111011110"
    "00000000000111111111111111111111111000000000000000000001000000000000000001"
    "11111111111111111111111111000000000000000000000000000000000000111111111111"
    "11111111111111111100000000000000000000000000000000111111111111111111111111"
    "11111111100000000000000000000000000000011111111111111111111111111111111111"
    "11000000000000000000000000111111111111111111111111111111111111111111000000"
    "00000000000000111111111111111111111111111111111111111111111111000000000000"
    "11111111111111111111111111";
int main() {
  int row, col;
  scanf("%d%d", &row, &col);
  int ind = row * 64 + col;
  if (str[ind] == '1')
    printf("OUT\n");
  else
    printf("IN\n");
}
