The input contains two integers *a*<sub class="lower-index">1</sub>, *a*<sub class="lower-index">2</sub> (0 ≤ *a*<sub class="lower-index">*i*</sub> ≤ 32), separated by a single space.
r,c=map(int,input().split())
print (0x1fd57ca7f82005620dd360d176eac9f4bb758c795d82aad0a0ff55555fc03ef9e011790bdf9dcff211639d0a3a29e18fd607fffc7258e174d35255165aa0ac151f40014668f5aa4fbc5475bf890e2026260d046d3724d875a23d537533a683b14af17f04770adf000e5a28b7f45e356a09d5f237752851f8ba3497ed5d237b5c20999f3c1fda29b91L>>(33*33-1-r*33-c))&1
