a,b=list(map(int,input().split()));print((('Imp'*((a%3 and b%3 and(a+b)%3)>0)or'P')+'ossible'))
print(((eval(input().replace(*' *'))%3%2*'Imp'or'P')+'ossible'))
a, b = list(map(int, input().split()))
print((("Imp" * ((a % 3 and b % 3 and (a + b) % 3) > 0) or "P") + "ossible"))

print(((eval(input().replace(*" *")) % 3 % 2 * "Imp" or "P") + "ossible"))

-a, b = list(map(int, input().split())) -print((("Imp" * ((a % 3 and b % 3 and (a + b) % 3) > 0) or "P") + "ossible")) +print(((eval(input().replace(*" *")) % 3 % 2 * "Imp" or "P") + "ossible"))