<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
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.InputMismatchException;
import java.util.List;

/**
 * @author MessiahJK
 * @version : A.java 2020/02/24 22:44 MessiahJK
 */
public class A {
    InputStream is;
    PrintWriter out;
    String INPUT = "27 27";

    void solve() {
        String str[] = {"1111111111111111111111111101010000001011111111111111111111111111",
                "1111111111111111111111010001010101101000001111111111111111111111",
                "1111111111111111111100010111011100101111011011111111111111111111",
                "1111111111111111100001010100000111100001010001011111111111111111",
                "1111111111111111001111110101111100001111010101001111111111111111",
                "1111111111111101100100000100010001011010011101101011111111111111",
                "1111111111111000110110111111010111000011001001001001111111111111",
                "1111111111100000010010010001000100011110011011011100011111111111",
                "1111111111000000000000111101111101110100110010010110001111111111",
                "1111111110000000000000000000010000000110000110000000000111111111",
                "1111111100000000000000000000000000000000000000000000000011111111",
                "1111111000000000000000000000000000000000000000000000000001111111",
                "1111111000000000000000000000000000000000000000000000000001111111",
                "1111110000000000000000000000000000000000000000000000000000111111",
                "1111100000000000000000000000000000000000000000000000000000011111",
                "1111100000000000000000000000000000000000000000000000000000011111",
                "1111000000000000000000000000000000000000000000000000000000001111",
                "1110000000000000000000000000000000000000000000000000000000000111",
                "1111100000000000000000000000000000000000000000000000000000000111",
                "1111111000000000000111011000000000000001110101000000000000011111",
                "1100111110000000001101110000000000000001011111110000000011111111",
                "1100001111100000111001011100000000000000010010011010011111110011",
                "1000000011111011100011000110000000000010110111001111111110000001",
                "1000000000111110110110010011100000000010010000011011110000000001",
                "1000000000000100100011111000110000000111011011110001000000000001",
                "1000000000111110111000100011100000000101000001011101101000000001",
                "0000000000001000101101101110110000001101101111001000111000000000",
                "0000000000011101101001000100010000101000100001100011101000000000",
                "0000000000010000001000011110110101111010110100001110001000000000",
                "0000000000011111011011000100011101010010010110111011011000000000",
                "0000000000001001000010010001110100011111000010100000010000000000",
                "0000000000011100011011011100010110001000011010001110111000000000",
                "0000000000000111110010001001000100111110110010011011101000000000",
                "0000000000000010010111101011110101101010010111001001000000000000",
                "0000000000001111000010101010100001001011010001100011100000000000",
                "0000000000000101101110001110000111011001111011001110000000000000",
                "0000000000000000111000111010010010010011010001011011000000000000",
                "0000000000000000001110100000011111000000011101110000000000000000",
                "1000000000000000011011110000010100000000000111011000000000000001",
                "1000000000000000000000000000000111100000000000000000000000000001",
                "1000000000000000000000000000101101000000000000000000000000000001",
                "1000000000000000000000000010111000000000000000000000000000000001",
                "1100000000000000000000000011101110000000000000000000000000000011",
                "1100000001100000000000000000001000000000000000000000000000000011",
                "1110000000101000000000000000011100000000000000000000010000000111",
                "1110000000111011100000000000110100000000000100000101111000000111",
                "1110000000101010110101110010100110101101001110011111010000000111",
                "1111000000001110011111011111110011100111111010110001000000001111",
                "1111100000001011000010000100011000111100010000010100000000011111",
                "1111100000000001011011011101000010001001011111011100000000011111",
                "1111110000000011110010010111101110101111000101110000000000111111",
                "1111111000000000100111000001001010111010011100000000000001111111",
                "1111111000000000110001101011100011101000110111000000000001111111",
                "1111111100000000011100001110001001000010000100000000000011111111",
                "1111111110000000001001111010111111011110100000000000000111111111",
                "1111111111000000000000101000010010010100110000000000001111111111",
                "1111111111100000000000001111000011110111100000000000011111111111",
                "1111111111111000000000000000000001000000000000000001111111111111",
                "1111111111111100000000000000000000000000000000000011111111111111",
                "1111111111111111000000000000000000000000000000001111111111111111",
                "1111111111111111100000000000000000000000000000011111111111111111",
                "1111111111111111111100000000000000000000000011111111111111111111",
                "1111111111111111111111000000000000000000001111111111111111111111",
                "1111111111111111111111111100000000000011111111111111111111111111",
        };
        int x=ni();
        int y=ni();
        if(str[x].charAt(y)=='1'){
            System.out.println("OUT");
        }else{
            System.out.println("IN");
        }
    }

    void run() throws Exception {
        is = oj ? System.in : new ByteArrayInputStream(INPUT.getBytes());
        out = new PrintWriter(System.out);

        long s = System.currentTimeMillis();
            solve();
        out.flush();
        tr(System.currentTimeMillis() - s + "ms");
    }

    public static void main(String[] args) throws Exception {
        new A().run();
    }

    private byte[] inbuf = new byte[1024];
    public int lenbuf = 0, ptrbuf = 0;

    private int readByte() {
        if (lenbuf == -1) {
            throw new InputMismatchException();
        }
        if (ptrbuf >= lenbuf) {
            ptrbuf = 0;
            try {
                lenbuf = is.read(inbuf);
            } catch (IOException e) {
                throw new InputMismatchException();
            }
            if (lenbuf <= 0) {
                return -1;
            }
        }
        return inbuf[ptrbuf++];
    }

    private boolean isSpaceChar(int c) {
        return !(c >= 33 && c <= 126);
    }

    private int skip() {
        int b;
        while ((b = readByte()) != -1 && isSpaceChar(b))
            ;
        return b;
    }

    private double nd() {
        return Double.parseDouble(ns());
    }

    private char nc() {
        return (char) skip();
    }

    private String ns() {
        int b = skip();
        StringBuilder sb = new StringBuilder();
        while (!(isSpaceChar(b))) { // when nextLine, (isSpaceChar(b) && b != ' ')
            sb.appendCodePoint(b);
            b = readByte();
        }
        return sb.toString();
    }

    private char[] ns(int n) {
        char[] buf = new char[n];
        int b = skip(), p = 0;
        while (p < n && !(isSpaceChar(b))) {
            buf[p++] = (char) b;
            b = readByte();
        }
        return n == p ? buf : Arrays.copyOf(buf, p);
    }

    private char[][] nm(int n, int m) {
        char[][] map = new char[n][];
        for (int i = 0; i < n; i++) {
            map[i] = ns(m);
        }
        return map;
    }

    private int[] na(int n) {
        int[] a = new int[n];
        for (int i = 0; i < n; i++) {
            a[i] = ni();
        }
        return a;
    }

    private int ni() {
        int num = 0, b;
        boolean minus = false;
        while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))
            ;
        if (b == '-') {
            minus = true;
            b = readByte();
        }

        while (true) {
            if (b >= '0' && b <= '9') {
                num = num * 10 + (b - '0');
            } else {
                return minus ? -num : num;
            }
            b = readByte();
        }
    }

    private long nl() {
        long num = 0;
        int b;
        boolean minus = false;
        while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))
            ;
        if (b == '-') {
            minus = true;
            b = readByte();
        }

        while (true) {
            if (b >= '0' && b <= '9') {
                num = num * 10 + (b - '0');
            } else {
                return minus ? -num : num;
            }
            b = readByte();
        }
    }

    private boolean oj = System.getProperty("ONLINE_JUDGE") != null;

    private void tr(Object... o) {
        if (!oj) {
            System.out.println(Arrays.deepToString(o));
        }
    }
}
