Types: N: int
Ranges: 1 ≤ N ≤ 9999
Addtl Info: Input ends with a line containing 0000; number of datasets does not exceed 10,000; output "NA" for numbers where all digits are the same