<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>
using namespace std;
const int MOD = 1e9 + 7;
string u =
    "11111111111111111111111111000000000000111111111111111111111111111111111111"
    "11111111111100000000000000000000111111111111111111111111111111111111111111"
    "00000000000000000000000011111111111111111111111111111111111110110000000000"
    "00000000000000000111111111111111111111111111111111001110000000000000000000"
    "00000000111111111111111111111111111111000001100000000000000000000000000000"
    "11111111111111111111111111100000011100000000000000000000000000000111111111"
    "11111111111111100000000011000000000000000000000000000000011111111111111111"
    "11110000000000111000000000000000000000000000000011111111111111111110000000"
    "00000110000000000000000000010000000000011111111111111111000000000000011101"
    "00000000000000000111100000000011111111111111100000000000000011010111010000"
    "00000000010000000000011111111111111000000000000000110111011100100000000011"
    "11100000000111111111111100000000000000000111010101101100000000000100000000"
    "00111111111110000000000000000011010001001110000000000111101000000001111111"
    "11110000000000000000100001011010110000000001001110000000011111111101100000"
    "00000000011111110000100110000000011000111000000011111110001100000000000001"
    "01010001011100101000000011011011000000011111101000000000000000110001111101"
    "00011110000000010100011000000111111011100000000000011001001000000101010000"
    "00001100010100000001111100101100000000000100111000011111110110000000011111"
    "00000000001111011000000000000001111010110101010000100000001101011010000000"
    "11100010101000000000001000111000000110111000000010000010110000000111111011"
    "10000000000111011000101100001010000000110110001000000001100000101000000000"
    "01010010101001111110000000000101001111100000011011111010000000000001100011"
    "11010001000000000001111001001000000100100010000000000000001101101000011110"
    "00011000110010111010000000111010111000000000000001010000101100000000100001"
    "01111000100000000000100010000000000000011110101001100000111001110010101000"
    "00000011101110110000000000000010111111010011100100110110000011000000000010"
    "10001000000000000000000001000000010011111000101101100000000001111011100000"
    "00000000000000111111010111101011100010001000000000000100100000000000000000"
    "00000001000111010010001101111011100000000101011010000000000000000000110001"
    "11010110000001000011101100000001110000100000000000000000011000110000010000"
    "00111011100010000000000001011000000000000000000011101001100000000000100100"
    "11100000001110110100000000000000000011101111110000000000101111101000000000"
    "00101001110000000000000011100010100000000000001110100011100000001010111101"
    "00000000000011100011101110100000000001001101101000000110111010000000000001"
    "10001110001000111000000000110110000010000001100000001000000000010010001110"
    "00100100000000000100001011100000011011110110000000000111111000110111111100"
    "00000001110110010000000111100111000000000000100010100001000101000000001101"
    "01000000000011110011000100000000011010001011000100011000000110011111000000"
    "00111110000111000000000011101010011111010010000000110100100000000111111111"
    "11000000000001101011110000011111100000000001101000000001111110010000000000"
    "00001000100101100010010000000001001000000000011111110001100000000000110111"
    "00010010001110000000111110000000001111111111110000000000000111011011011101"
    "10100000001001000000000111111111100110000000000000100100100100010000000001"
    "10110000000001111111111100100000000000011100011101101110000000001000000000"
    "00111111111111100000000000000011110101001110100000000111000000000111111111"
    "11111000000000000000110111000110100000000001000000000001111111111111110000"
    "00000000011100100111000000000000111000000000111111111111111110000000000001"
    "10011111011000000000000100000000011111111111111111110000000000011000000000"
    "00000000000000000000001111111111111111111110000000001110000000000000000000"
    "00000000000111111111111111111111111000000011000000000000000000000000000001"
    "11111111111111111111111111000000110000000000000000000000000000111111111111"
    "11111111111111111100011100000000000000000000000000111111111111111111111111"
    "11111111100110000000000000000000000000011111111111111111111111111111111111"
    "11100000000000000000000000111111111111111111111111111111111111111111000000"
    "00000000000000111111111111111111111111111111111111111111111111000000000000"
    "11111111111111111111111111";
int main() {
  int a, b;
  cin >> a >> b;
  char w = u[64 * b + a];
  if (w == '1')
    cout << "OUT";
  else
    cout << "IN";
}
