<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;
char b[483][483];
const int dx[4] = {1, -1, 0, 0}, dy[4] = {0, 0, -1, 1};
int re[483][483];
int cc;
void init() {
  freopen("file.txt", "r", stdin);
  freopen("ans.txt", "w", stdout);
  for (int i = 0; i < 482; ++i) {
    scanf("%s", b[i]);
  }
  for (int i = 0; i < 482; ++i) {
    for (int j = 0; j < 482; ++j) {
      if (b[i][j] == '1') continue;
      if (re[i][j] == 0) {
        queue<int> qx, qy;
        qx.push(i);
        qy.push(j);
        re[i][j] = ++cc;
        while (!qx.empty()) {
          int x = qx.front();
          int y = qy.front();
          qx.pop();
          qy.pop();
          for (int d = 0; d < 4; ++d) {
            int u = dx[d] + x, v = dy[d] + y;
            if (u >= 0 && u < 482 && v >= 0 && v < 482) {
              if (re[u][v] == 0 && b[u][v] == '0') {
                re[u][v] = cc;
                qx.push(u);
                qy.push(v);
              }
            }
          }
        }
      }
    }
  }
  for (int i = 0; i < 482; ++i) {
    for (int j = 0; j < 482; ++j) cout << re[i][j];
    cout << endl;
  }
  cerr << cc;
}
int ff[64][64];
void init2() {
  freopen("ans.txt", "r", stdin);
  freopen("coo.txt", "w", stdout);
  for (int i = 0; i < 482; ++i)
    for (int j = 0; j < 482; ++j) {
      scanf(" %c", &re[i][j]);
    }
  for (int i = 0; i < 64; ++i) {
    for (int j = 0; j < 64; ++j) {
      int x = 7.53125 * i + 3;
      int y = 7.53125 * j + 3;
      ff[i][j] = re[x][y] == '2';
      cout << ff[i][j];
    }
    cout << '\\' << endl;
  }
}
const string x =
    "00000000000000000000000000101011111101000000000000000000000000000000000000"
    "00000000000010111010101001011111000000000000000000000000000000000000000000"
    "11101000100011010000100100000000000000000000000000000000000001111010101111"
    "10000111101011101000000000000000000000000000000000110000001010000011110000"
    "10101011000000000000000000000000000000100110111110111011101001011000100101"
    "00000000000000000000000000011100100100000010100011110011011011011000000000"
    "00000000000000011111101101101110111011100001100100100011100000000000000000"
    "00001111111111110000100000100010110011011010011100000000000000000001111111"
    "11111111111110111111100111100111111111100000000000000000111111111111111111"
    "11111111111111111111111111111100000000000000011111111111111111111111111111"
    "11111111111111111111100000000000000111111111111111111111111111111111111111"
    "11111111111000000000000011111111111111111111111111111111111111111111111111"
    "11000000000001111111111111111111111111111111111111111111111111111110000000"
    "00011111111111111111111111111111111111111111111111111111100000000011111111"
    "11111111111111111111111111111111111111111111111100000001111111111111111111"
    "11111111111111111111111111111111111111100000000111111111111111111111111111"
    "11111111111111111111111111111000000000011111111111100010011111111111111000"
    "10101111111111111000000011000001111111110010001111111111111110100000001111"
    "11110000000000111100000111110001101000111111111111111011011001011000000011"
    "00011111110000010001110011100111111111110100100011000000000111111001111111"
    "11000001001001101100011111111101101111100100001111111110011111111111101101"
    "11000001110011111110001001000011101111111111100111111111000001000111011100"
    "01111111101011111010001001011111111011111111111101110100100100010011111100"
    "10010000110111000111111111111111111110001001011011101110111101011101111001"
    "11000101111111111111111111101111110111100001001010000101001011110001110111"
    "11111111111111111000001001001110111000101011011010010001001001111111111111"
    "11111111011011110110111000101110000011110101111110111111111111111111111000"
    "11100100100011101001110111100101110001000111111111111111111111100000110111"
    "01101110110000010011011001000101111111111111111111111101101000010100001010"
    "01010110100011011011111111111111111111111100001111010101010111101101001011"
    "10011100011111111111111111111111101001000111000111100010011000010011000111"
    "11111111111111111111111111000111000101101101101100101110100100111111111111"
    "11111111111111111100010111111000001111111000100011111111111111110111111111"
    "11111110010000111110101111111111100010011111111111111001111111111111111111"
    "11111111111000011111111111111111111111111110011111111111111111111111111101"
    "00101111111111111111111111111111100111111111111111111111111101000111111111"
    "11111111111111111111111000111111111111111111111111000100011111111111111111"
    "11111111111100001111111001111111111111111111011111111111111111111111111111"
    "11000001111111010111111111111111100011111111111111111111101111111000000111"
    "11110001000111111111110010111111111110111110100001111110000001111111010101"
    "00101000110101100101001011000110000010111111100000001111111100011000001000"
    "00001100011000000101001110111111110000000001111111010011110111101110011100"
    "00111011111010111111111000000000011111111110100100100010111101110110100000"
    "10001111111110000000000011111111000011011010000100010100001110100011111111"
    "11000000000000011111111101100011111011010100010110001111111111111000000000"
    "00000111111111001110010100011100010111001000111111111110000000000000001111"
    "11111000111100011101101111011110111111111111000000000000000001111111110110"
    "00010100000010000101111111111111100000000000000000001111111111110101111011"
    "01101011001111111111110000000000000000000001111111111111000011110000100001"
    "11111111111000000000000000000000000111111111111111111110111111111111111110"
    "00000000000000000000000000111111111111111111111111111111111111000000000000"
    "00000000000000000011111111111111111111111111111111000000000000000000000000"
    "00000000011111111111111111111111111111100000000000000000000000000000000000"
    "00111111111111111111111111000000000000000000000000000000000000000000111111"
    "11111111111111000000000000000000000000000000000000000000000000111111111111"
    "00000000000000000000000000";
string v[2];
int main() {
  v[0] = "OUT";
  v[1] = "IN";
  int r, c;
  cin >> r >> c;
  cout << v[x[r * 64 + c] - '0'];
}
