<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;
string s[100];
int32_t main() {
  s[0] = " 0000000000000000000000000010101111110100000000000000000000000000 ";
  s[1] = " 0000000000000000000000101110101010010111110000000000000000000000 ";
  s[2] = " 0000000000000000000011101000100011010000100100000000000000000000 ";
  s[3] = " 0000000000000000011110101011111000011110101110100000000000000000 ";
  s[4] = " 0000000000000000110000001010000011110000101010110000000000000000 ";
  s[5] = " 0000000000000010011011111011101110100101100010010100000000000000 ";
  s[6] = " 0000000000000111001001000000101000111100110110110110000000000000 ";
  s[7] = " 0000000000011111101101101110111011100001100100100011100000000000 ";
  s[8] = " 0000000000111111111111000010000010001011001101101001110000000000 ";
  s[9] = " 0000000001111111111111111111101111111001111001111111111000000000 ";
  s[10] = " 0000000011111111111111111111111111111111111111111111111100000000 ";
  s[11] = " 0000000111111111111111111111111111111111111111111111111110000000 ";
  s[12] = " 0000000111111111111111111111111111111111111111111111111110000000 ";
  s[13] = " 0000001111111111111111111111111111111111111111111111111111000000 ";
  s[14] = " 0000011111111111111111111111111111111111111111111111111111100000 ";
  s[15] = " 0000011111111111111111111111111111111111111111111111111111100000 ";
  s[16] = " 0000111111111111111111111111111111111111111111111111111111110000 ";
  s[17] = " 0001111111111111111111111111111111111111111111111111111111111000 ";
  s[18] = " 0000011111111111111111111111111111111111111111111111111111111000 ";
  s[19] = " 0000000111111111111000100111111111111110001010111111111111100000 ";
  s[20] = " 0011000001111111110010001111111111111110100000001111111100000000 ";
  s[21] = " 0011110000011111000110100011111111111111101101100101100000001100 ";
  s[22] = " 0111111100000100011100111001111111111101001000110000000001111110 ";
  s[23] = " 0111111111000001001001101100011111111101101111100100001111111110 ";
  s[24] = " 0111111111111011011100000111001111111000100100001110111111111110 ";
  s[25] = " 0111111111000001000111011100011111111010111110100010010111111110 ";
  s[26] = " 1111111111110111010010010001001111110010010000110111000111111111 ";
  s[27] = " 1111111111100010010110111011101111010111011110011100010111111111 ";
  s[28] = " 1111111111101111110111100001001010000101001011110001110111111111 ";
  s[29] = " 1111111111100000100100111011100010101101101001000100100111111111 ";
  s[30] = " 1111111111110110111101101110001011100000111101011111101111111111 ";
  s[31] = " 1111111111100011100100100011101001110111100101110001000111111111 ";
  s[32] = " 1111111111111000001101110110111011000001001101100100010111111111 ";
  s[33] = " 1111111111111101101000010100001010010101101000110110111111111111 ";
  s[34] = " 1111111111110000111101010101011110110100101110011100011111111111 ";
  s[35] = " 1111111111111010010001110001111000100110000100110001111111111111 ";
  s[36] = " 1111111111111111000111000101101101101100101110100100111111111111 ";
  s[37] = " 1111111111111111110001011111100000111111100010001111111111111111 ";
  s[38] = " 0111111111111111100100001111101011111111111000100111111111111110 ";
  s[39] = " 0111111111111111111111111111111000011111111111111111111111111110 ";
  s[40] = " 0111111111111111111111111111010010111111111111111111111111111110 ";
  s[41] = " 0111111111111111111111111101000111111111111111111111111111111110 ";
  s[42] = " 0011111111111111111111111100010001111111111111111111111111111100 ";
  s[43] = " 0011111110011111111111111111110111111111111111111111111111111100 ";
  s[44] = " 0001111111010111111111111111100011111111111111111111101111111000 ";
  s[45] = " 0001111111000100011111111111001011111111111011111010000111111000 ";
  s[46] = " 0001111111010101001010001101011001010010110001100000101111111000 ";
  s[47] = " 0000111111110001100000100000001100011000000101001110111111110000 ";
  s[48] = " 0000011111110100111101111011100111000011101111101011111111100000 ";
  s[49] = " 0000011111111110100100100010111101110110100000100011111111100000 ";
  s[50] = " 0000001111111100001101101000010001010000111010001111111111000000 ";
  s[51] = " 0000000111111111011000111110110101000101100011111111111110000000 ";
  s[52] = " 0000000111111111001110010100011100010111001000111111111110000000 ";
  s[53] = " 0000000011111111100011110001110110111101111011111111111100000000 ";
  s[54] = " 0000000001111111110110000101000000100001011111111111111000000000 ";
  s[55] = " 0000000000111111111111010111101101101011001111111111110000000000 ";
  s[56] = " 0000000000011111111111110000111100001000011111111111100000000000 ";
  s[57] = " 0000000000000111111111111111111110111111111111111110000000000000 ";
  s[58] = " 0000000000000011111111111111111111111111111111111100000000000000 ";
  s[59] = " 0000000000000000111111111111111111111111111111110000000000000000 ";
  s[60] = " 0000000000000000011111111111111111111111111111100000000000000000 ";
  s[61] = " 0000000000000000000011111111111111111111111100000000000000000000 ";
  s[62] = " 0000000000000000000000111111111111111111110000000000000000000000 ";
  s[63] = " 0000000000000000000000000011111111111100000000000000000000000000 ";
  int i, j;
  cin >> i >> j;
  if (s[i][j + 1] == '1')
    cout << "IN" << '\n';
  else
    cout << "OUT" << '\n';
}
