D. Dissecting a Hexagon |
Given an integer n, determine whether it is possible to dissect/divide a regular hexagon into n parallelograms. An example of a hexagon dissected into 3 parallelograms is given below.
There is at most 800 inputs. Each input is n (n<1000001) on a single line.
For each input, output the answer on a single line. Output 1 if it is possible to dissect a regular hexagon into n parallelograms, otherwise output 0.
2 147
0 1
Problem setter: Josh Bao