UVa 10177: Accepted
UVa 10178: Accepted