794

Problem ID: 794

Since the sample input on UVa Online Judge is not copiable without losing its formatting, this has been uploaded as critical input.