module c;wire c,d;initial begin while($fscanf(1<<31,"%b",d))$write($sqrt(8*d+1)-1==d*2);end endmodule