X,Y = map(int,input().split()) A={X,Y} A.add((X+4)%12); A.add((X+8)%12) A.remove(X); A.remove(Y) print(*A)