20131014-08

UVA 10963: read question carefully and be careful about output format.
have to scan all inputs.