Problem statement is here: http://acm.timus.ru/problem.aspx?space=1&num=1409
One of the easiest problem. Code as the problem states.
public class Task1409 { public void solve(int testNumber, InputReader in, OutputWriter out) { int harry = in.nextInt(); int larry = in.nextInt(); int sum = harry + larry - 1; out.println((sum - harry) + " " + (sum - larry)); } }