for i=0:49 g=hex2dec(input('')); A=[0 1 3 6 10 15 21 28 36 45 55 66 78 91 105 120 136 153 171 190 210 231 253]; t=0; disp(any(all(A==g))) endfor