Types: n: int, x: int  
Ranges: 3 ≤ n ≤ 100, 0 ≤ x ≤ 300  
Addtl Info: Input ends with "0 0", which should not be processed.