Problem:


Score : 100 points

Problem Statement

Snuke is giving cookies to his three goats.

He has two cookie tins. One contains A cookies, and the other contains B cookies. He can thus give A cookies, B cookies or A+B cookies to his goats (he cannot open the tins).

Your task is to determine whether Snuke can give cookies to his three goats so that each of them can have the same number of cookies.

Constraints

1 \leq A,B \leq 100

Both A and B are integers.

Input

Input is given from Standard Input in the following format:

A B

Output

If it is possible to give cookies so that each of the three goats can have the same number of cookies, print Possible; otherwise, print Impossible.

Sample Input 1

4 5

Sample Output 1

Possible

If Snuke gives nine cookies, each of the three goats can have three cookies.

Sample Input 2

1 1

Sample Output 2

Impossible

Since there are only two cookies, the three goats cannot have the same number of cookies no matter what Snuke gives to them.



Sample input:
4 5


Sample output:
Possible

Submission status: Accepted

Solution code:
A,B = (int(T) for T in input().split())
print(['Impossible','Possible'][any(T%3==0 for T in [A,B,A+B])])

Submission status: Accepted

Solution code:
x,y=map(int,input().split())
if (x+y)%3 == 0 or x%3 ==0 or y%3==0:
    print('Possible')
else:        
    print('Impossible')

Submission status: Accepted

Solution code:
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


def main():
    A, B = map(int, read().split())

    if A % 3 == 0 or B % 3 == 0 or (A + B) % 3 == 0:
        print('Possible')
    else:
        print('Impossible')

    return


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import bisect,collections,copy,heapq,itertools,math,string
import sys
def S(): return sys.stdin.readline().rstrip()
def M(): return map(int,sys.stdin.readline().rstrip().split())
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())
a, b = M()
if a%3==0 or b%3==0 or (a+b)%3==0:
    print('Possible')
else:
    print('Impossible')

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
for i in (a,b,a+b):
  if i%3==0:
    print("Possible")
    exit()
    
print("Impossible")

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
Flag = "Impossible"
if a%3==0:
  Flag = "Possible"
elif b%3 ==0:
  Flag="Possible"
elif (a+b)%3==0:
  Flag = "Possible"
  
print(Flag)

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
if a % 3 == 0 or b % 3 == 0 or (a + b) % 3 == 0:
    print("Possible")
else:
    print("Impossible")

Submission status: Accepted

Solution code:
A, B = input().split(" ")

A = int(A)
B = int(B)
C = A + B

if A % 3 == 0 or B % 3 == 0 or C % 3 == 0:
  print("Possible")
else:
  print("Impossible")

Submission status: Accepted

Solution code:
#-*-coding:utf-8-*-
import sys
input=sys.stdin.readline

def main():
    a,b = map(int,input().split())

    if a % 3 ==0 or b %3 == 0 or (a+b)%3 ==0:
        print("Possible")
    else:
        print("Impossible")

if __name__=="__main__":
    main()

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline


def main():
    A,B = [int(i) for i in input().strip().split()]

    if A % 3 == 0 or B % 3 == 0 or (A + B) % 3 == 0:
        print("Possible")
    else:
        print("Impossible")

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
a,b=map(int,input().split())

print('Possible' if a%3==0 or b%3==0 or (a+b)%3==0 else "Impossible")

Submission status: Accepted

Solution code:
a,b = map(int, input().split())

if a % 3 == 0 or b % 3 == 0 or (a+b) % 3 == 0:
  print("Possible")
else:
  print("Impossible")

Submission status: Accepted

Solution code:
a, b = map(int, input().split())

if a%3==0 or b%3==0 or (a+b)%3==0:
  print('Possible')
else:
  print('Impossible')

Submission status: Accepted

Solution code:
a, b = map(int, input().split())

if a % 3 == 0 or b % 3 == 0 or (a+b) % 3 == 0:
    print("Possible")
else:
    print("Impossible")

Submission status: Accepted

Solution code:
a, b = map(int, input().split())

if a%3 == 0 or b%3 == 0 or (a+b)%3 == 0:
    print('Possible')
else:
    print('Impossible')

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
if a %3==0 or b%3==0 or (a+b)%3 ==0:
  print("Possible")
else:
  print("Impossible")

Submission status: Accepted

Solution code:
A, B = map(int,input().split())

if A % 3 ==0 or B % 3 == 0 or (A+B) % 3 == 0:
    print("Possible")
else:
    print("Impossible")

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
if a%3 == 0 or b%3 == 0 or (a+b)%3 == 0:
    print("Possible")
else:
    print("Impossible")

Submission status: Accepted

Solution code:
A,B=map(int,input().split())
print("Possible" if A*B*(A+B)%3==0 else "Impossible")

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
print("Possible" if a % 3 == 0 or b % 3 == 0 or (a+b)%3 == 0 else "Impossible")

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
c = a+b
if a % 3 == 0 or b % 3 == 0 or c % 3 == 0:
  print("Possible")
else:
  print("Impossible")

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
if a%3 == 0 or b%3 == 0 or (a+b)%3 == 0:
	print("Possible")
else:
	print("Impossible")

Submission status: Accepted

Solution code:
a, b = map(int, input().split())

if a % 3 == 0 or b % 3 == 0 or (a+b) % 3 == 0:
    print("Possible")
else:
    print("Impossible")

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
if (a%3==0) or (b%3==0) or ((a+b)%3==0):
  print("Possible")
else:
  print("Impossible")

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
if a % 3 == 0 or b % 3 == 0 or (a+b) % 3 == 0:
    print('Possible')
else:
    print('Impossible')

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
if a%3==0 or b%3==0 or (a+b)%3==0:
    print('Possible')
else:
    print('Impossible')

Submission status: Accepted

Solution code:
A,B = map(int, input().split())

print('Possible' if A*B*(A + B)%3 == 0 else 'Impossible')

Submission status: Accepted

Solution code:
a, b = [int(x) for x in input().split()]
print("Possible" if a % 3 == 0 or b % 3 == 0 or (a + b) % 3 == 0 else "Impossible")

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
tf = a % 3 == 0 or b % 3 == 0 or (a + b) % 3 == 0
print("Possible" if tf else "Impossible")

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
if a % 3 == 0 or b % 3 == 0 or (a+b) % 3 == 0:
  print("Possible")
else:
  print("Impossible")

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
if a%3 == 0:
  print("Possible")
elif b%3 == 0:
  print("Possible")
elif (a+b)%3 == 0:
  print("Possible")
else:
  print("Impossible")

Submission status: Accepted

Solution code:
A, B = map(int, input().split())

print("Possible" if (A % 3 == 0 or B % 3 == 0 or (A + B) % 3 == 0) else "Impossible")

Submission status: Accepted

Solution code:
a, b = map(int, input().split())

if a%3==0 or b%3==0 or (a+b)%3==0:
    print('Possible')
else:
    print('Impossible')

Submission status: Accepted

Solution code:
A,B=map(int,input().split(' '))
if (A+B)%3 and A%3 and B%3:
  print('Impossible')
else:
  print('Possible')

Submission status: Accepted

Solution code:
c = [int(x) for x in input().split()]
c.append(sum(c))
for i in c:
    if i % 3 == 0:
        print("Possible")
        break
else:
    print("Impossible")

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
print(['Impossible','Possible'][a%3 == 0 or b%3 == 0 or (a+b) %3 == 0])

Submission status: Accepted

Solution code:
a, b = map(int, input().split())

if a % 3 == 0 or b % 3 == 0 or (a + b) % 3 == 0:
  print('Possible')
else:
  print('Impossible')

Submission status: Accepted

Solution code:
def main():
    a,b=map(int, input().split())
    if(a%3==0 or b%3==0 or (a+b)%3==0):
        print("Possible")
    else:
        print("Impossible")
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
A,B=map(int,input().split())
if (A%3==0)|(B%3==0)|((A+B)%3==0):
    print("Possible")
else:
    print("Impossible")

Submission status: Accepted

Solution code:
A, B = map(int, input().split())

if A % 3 == 0 or B % 3 == 0 or (A + B) % 3 == 0:
    print("Possible")
else:
    print("Impossible")

Submission status: Accepted

Solution code:
a,b = (int(x) for x in input().split())
if a%3==0 or b%3==0 or (a+b)%3==0:
  print ('Possible')
else:
  print ('Impossible')

Submission status: Accepted

Solution code:
a,b=map(int,input().split())

if a%3==0 or b%3==0 or (a+b)%3==0:
    print("Possible")
else:
    print("Impossible")

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
if a%3 == 0:
    print('Possible')
elif b%3 == 0:
    print('Possible')
elif (a+b)%3 == 0:
    print('Possible')
else:
    print('Impossible')

Submission status: Accepted

Solution code:
A, B = map(int, input().split())
if A % 3 == 0 or B % 3 == 0 or (A+B) % 3 == 0:
  print("Possible")
else:
  print("Impossible")

Submission status: Accepted

Solution code:
A,B=map(int,input().split())
if A%3==0:
    print('Possible')
elif B%3==0:
    print('Possible')
elif (A+B)%3==0:
    print('Possible')
else:
    print('Impossible')

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
if a % 3 == 0 or b % 3 == 0 or (a + b) % 3 == 0:
    print("Possible")
else:
    print("Impossible")

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

A,B=list(map(int,input().split()))
print('Possible' if (A*B%3 == 0) or ((A+B)%3) ==0 else 'Impossible')

Submission status: Accepted

Solution code:
a, b = list(map(int, input().split()))

if (a%3 == 0) or (b%3 == 0) or ((a+b)%3 == 0):
    print("Possible")
else:
    print("Impossible")

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
if a%3 == 0 or b%3 == 0 or (a+b)%3 == 0:
    print('Possible')
else:
    print('Impossible')

Submission status: Accepted

Solution code:
import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np

rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: sys.stdin.readline().split()
ri = lambda: int(sys.stdin.readline())
rm = lambda: map(int, sys.stdin.readline().split())
rl = lambda: list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod = 10**9 + 7

a, b = rm()
if a%3 == 0 or b%3 == 0 or (a+b)%3 == 0:
  print('Possible')
else:
  print('Impossible')

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
if (a + b) % 3 == 0:
  print('Possible')
  exit()
elif a % 3 == 0:
  print('Possible')
  exit()
elif b % 3 == 0:
  print('Possible')
  exit()
print('Impossible')

Submission status: Accepted

Solution code:
a, b = map(int, input().split())

if (a % 3 == 0) or (b % 3 == 0) or ((a + b) % 3 == 0):
    print('Possible')
else:
    print('Impossible')

Submission status: Accepted

Solution code:
A = list(map(int, input().split()))
A.append(sum(A))

ans = False
for i in A:
  if i%3 == 0:
    ans = True
if ans:
  print("Possible")
else:
  print("Impossible")

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
print('Possible' if a % 3 == 0 or b % 3 == 0 or (a + b) % 3 == 0 else 'Impossible')

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
if (a+b) % 3 == 0 or a % 3 == 0 or b % 3 == 0:
  print("Possible")
else:
  print("Impossible")

Submission status: Accepted

Solution code:
A,B=map(int,input().split());s='ossible'
if A%3*B%3*(A+B)%3==0:print('P'+s)
else:print('Imp'+s)

Submission status: Accepted

Solution code:
A,B=map(int,input().split())
if A%3*B%3*(A+B)%3==0:print('Possible')
else:print('Impossible')

Submission status: Accepted

Solution code:
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
def s(): return input()
def i(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 9)
INF = 10**9
mod = 10**9+7

A,B = I()
if A%3 == 0 or B%3 == 0 or (A+B)%3 == 0:
    print('Possible')
else:
    print('Impossible')

Submission status: Accepted

Solution code:
A, B = map(int, input().split())
print("Possible" if any((i%3==0 for i in (A, B, A+B))) else "Impossible")

Submission status: Accepted

Solution code:
A, B = map(int, input().split())
if A%3 == 0 or B%3 == 0 or (A+B)%3 == 0:
  print('Possible')
else:
  print('Impossible')

Submission status: Accepted

Solution code:
a,b = map(int, input().split())
print("Possible") if (a%3==0)|(b%3==0)|((a+b)%3==0) else print("Impossible")

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
if a%3==0 or b%3==0 or (a+b)%3==0:
  print("Possible")
else:
  print("Impossible")

Submission status: Accepted

Solution code:
a,b = (int(i) for i in input().split())
if (a%3 == 0) or (b%3 == 0) or ((a+b)%3 == 0):
  print("Possible")
else:
  print("Impossible")

Submission status: Accepted

Solution code:
A,B=map(int,input().split())
#print(A+B)

if A%3==0 or B%3==0 or (A+B)%3==0:
  print("Possible")
else:
  print("Impossible")

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
if (a+b) % 3 == 0 or a%3 == 0 or b%3 == 0: print("Possible")
else: print("Impossible")

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
print('Possible' if a%3==0 or b%3==0 or (a+b)%3==0 else 'Impossible')

Submission status: Accepted

Solution code:
a,b=[int(i) for i in input().split()]

if a%3==0 or b%3==0 or (a+b)%3==0:
    print("Possible")
else:
    print("Impossible")

Submission status: Accepted

Solution code:
a,b = map(int, input().split())

if a%3 == 0 or b%3 ==0 or (a+b)%3 ==0:
    print("Possible")
else:
    print("Impossible")

Submission status: Accepted

Solution code:
A, B = map(int, input().split())
print("Possible" if (A%3==0) or (B%3==0) or ((A+B)%3==0) else "Impossible")

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
if a%3==0 or b%3==0 or (a+b)%3==0:
  print('Possible')
else:
  print('Impossible')

Submission status: Accepted

Solution code:
A,B = map(int,input().split())
if (A+B)%3==0 or A%3==0 or B%3==0:
  print("Possible")
else:
  print("Impossible")

Submission status: Accepted

Solution code:
a,b = map(int,input().split())

if a % 3 == 0 or b % 3 == 0 or (a+b) % 3 == 0:
    print("Possible")
else:
    print("Impossible")

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
print("Possible" if a%3 == 0 or b%3 == 0 or (a+b)%3 == 0 else "Impossible")

Submission status: Accepted

Solution code:
a,b=map(int,input().split());print("Possible" if (a%3==0 or b%3==0 or (a+b)%3==0) else "Impossible")

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
 
if a%3==0 or b%3==0 or (a+b)%3==0:
    print('Possible')
else:
    print('Impossible')

Submission status: Accepted

Solution code:
a,b=map(int, input().split())
if a%3==0:
  print("Possible")
elif b%3==0:
  print("Possible")
elif (a+b)%3==0:
  print("Possible")
else:
  print("Impossible")

Submission status: Accepted

Solution code:
a,b=map(int,input().split())

if a%3==0 or b%3==0 or (a+b)%3==0:
    print('Possible')

else:
    print('Impossible')

Submission status: Accepted

Solution code:
print(f"{eval(input().replace(*' *'))%3%2*'Imp'or'P'}ossible")

Submission status: Accepted

Solution code:
print((eval(input().replace(*' *'))%3%2*'Imp'or'P')+'ossible')

Submission status: Accepted

Solution code:
A,B=map(int,input().split())
if A%3==0 or B%3==0 or (A+B)%3==0:
  print('Possible')
else:
  print('Impossible')

Submission status: Accepted

Solution code:
li = list(map(int,input().split()))
li.append(li[0]+li[1])
for i in range(3):
    if li[i] % 3 == 0:
        print("Possible")
        exit()
print("Impossible")

Submission status: Accepted

Solution code:
import sys
A,B = map(int,input().split())

if A < 0 or B < 0 or A > 100 or B > 100:
    sys.exit()

if A % 3 == 0 or B % 3 == 0 or (A + B) % 3 == 0:
    print("Possible")
else:
    print("Impossible")

Submission status: Accepted

Solution code:
A, B = map(int, input().split())

a = A % 3
b = B % 3
ab = (A + B) % 3

if (a == 0) or (b == 0) or (ab == 0):
    print("Possible")

else:
    print("Impossible")

Submission status: Accepted

Solution code:
a, b = map(int,input().split())
if a % 3 == 0:
  print('Possible')
elif b % 3 == 0:
  print('Possible')

elif (a + b) % 3 == 0:
  print('Possible')
else:
  print('Impossible')

Submission status: Accepted

Solution code:
from fractions import gcd
from collections import Counter, deque, defaultdict
from heapq import heappush, heappop, heappushpop, heapify, heapreplace, merge
from bisect import bisect_left, bisect_right, bisect, insort_left, insort_right, insort
from itertools import accumulate, product, permutations, combinations

def main():
    A, B = map(int, input().split())

    print('Possible') if not A%3 or not B%3 or not (A+B)%3 else print('Impossible')

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

a, b = map(int, input().split())

if a % 3 == 0 or b % 3 == 0 or (a + b) % 3 == 0:
    print('Possible')
else:
    print('Impossible')

Submission status: Accepted

Solution code:
def actual(A, B):
    if A % 3 == 0 or B % 3 == 0 or (A + B) % 3 == 0:
        return 'Possible'

    return 'Impossible'

A, B = map(int, input().split())
print(actual(A, B))

Submission status: Accepted

Solution code:
a,b = map(int, input().split())

if a%3 != 0 and b%3 != 0 and (a+b)%3 != 0:
    print("Impossible")
else:
    print("Possible")

Submission status: Accepted

Solution code:
def main():
    A, B = map(int, input().split())
    if A % 3 == 0 or B % 3 == 0 or (A+B) % 3 == 0:
        print('Possible')
    else:
        print('Impossible')
main()

Submission status: Accepted

Solution code:
A,B = map(int,input().split())

if A%3==0 or B%3==0 or (A+B)%3==0:
  print("Possible")
else:
  print("Impossible")

Submission status: Accepted

Solution code:
A,B = map(int,input().split())

print('Possible' if (A % 3 == 0) or (B % 3 == 0) or ((A + B) % 3 == 0) else 'Impossible')

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
if a%3 ==0 or b%3 == 0 or (a+b)%3 == 0:
  print('Possible')
else:
  print('Impossible')

Submission status: Accepted

Solution code:
A, B = map(int, input().split())
print('Possible' if A % 3 == 0 or B % 3 == 0 or (A + B) % 3 == 0 else 'Impossible')

Submission status: Accepted

Solution code:
A, B = map(int, input().split())
aa = A+B

if A % 3 == 0 or B%3==0 or aa%3==0:
    print("Possible")
else:
    print("Impossible")

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
if a%3 == 0 or b%3 ==0 or (a+b)%3 == 0:
  print('Possible')
else:
  print('Impossible')

Submission status: Accepted

Solution code:
A,B=map(int,input().split());print(['Imp','P'][any([1 for i in [A,B,A+B] if i%3==0])]+'ossible')

Submission status: Accepted

Solution code:
A,B=map(int,input().split());print(['Impossible','Possible'][any([1 for i in [A,B,A+B] if i%3==0])])

Submission status: Accepted

Solution code:
A,B=map(int,input().split());print(['Impossible','Possible'][any([True for i in [A,B,A+B] if i%3==0])])

Submission status: Accepted

Solution code:
def resolve():
    a, b = map(int, input().split())

    ans = str()
    if a % 3 == 0 or b % 3 == 0 or (a+b) % 3 == 0:
        ans = "Possible"
    else:
        ans = "Impossible"
    
    print(ans)
resolve()

Submission status: Accepted

Solution code:
A,B = map(int,input().split())
if((A%3 == 0) or (B%3 == 0) or ((A+B)%3 == 0)):
    print("Possible")
else:
    print("Impossible")

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
if a%3 ==0:
    print("Possible")
elif b%3==0:
    print("Possible")
elif (a+b)%3==0:
    print("Possible")
else :
    print("Impossible")

Submission status: Accepted

Solution code:
import sys
a,b = map(int,input().split())
if (a+b)%3 == 0:
  print("Possible")
  sys.exit()
elif a%3 == 0:
  print("Possible")
  sys.exit()
elif b%3 == 0:
  print("Possible")
  sys.exit()
else:
  print("Impossible")

Submission status: Accepted

Solution code:
a,b = map(int,input().split())

c = a + b

if a % 3 == 0 or b % 3 == 0 or c % 3 == 0:
    print('Possible')
else:
    print('Impossible')

Submission status: Accepted

Solution code:
A,B=map(int,input().split())
if A%3==0 or B%3==0 or (A+B)%3==0:
  print("Possible")
else:
  print("Impossible")

Submission status: Accepted

Solution code:
A, B = map(int, input().split())
if A % 3 == 0 or B % 3 == 0 or (A + B) % 3 == 0 :
  print("Possible")
else :
  print("Impossible")

Submission status: Accepted

Solution code:
a,b = map(int, input().split())
result = a + b
if a % 3 == 0:
  print('Possible')
elif b % 3 == 0:
  print('Possible')
elif (a+b) % 3 == 0:
    print('Possible')
else:
  print('Impossible')

Submission status: Accepted

Solution code:
a, b = map(int, input().split())

if a % 3 == 0:
    print('Possible')
    exit()
elif b % 3 == 0:
    print('Possible')
    exit()
elif (a+b) % 3 == 0:
    print('Possible')
    exit()
else:
    print('Impossible')

Submission status: Accepted

Solution code:
a, b = map(int, (input().split()))
print('Possible'if a%3==0 or b%3==0 or (a+b)%3==0 else 'Impossible')

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
print('Possible' if (a%3==0 or b%3==0 or (a+b)%3==0) else 'Impossible')

Submission status: Accepted

Solution code:
a,b = list(map(int,input().strip().split()))
if a % 3== 0 or b % 3 ==0 or (a+b) %3 == 0:
  print("Possible")
else:
  print("Impossible")

Submission status: Accepted

Solution code:
A,B=map(int,input().split())

if A%3==0 or B%3==0 or (A+B)%3==0:
  print("Possible")
else:
  print("Impossible")

Submission status: Accepted

Solution code:
A, B = map(int, input().split())

a = A % 3
b = B % 3

if a == b == 1 or a == b == 2:
  print('Impossible')
else:
  print('Possible')

Submission status: Accepted

Solution code:
a, b = sorted(map(int, input().split()))
if (a%3 == 0) or (b%3 == 0) or ((a+b)%3 == 0):
    print("Possible")
else:
    print("Impossible")

Submission status: Accepted

Solution code:
#ABC 067 A

A,B =map(int,input().split())

if A%3==0 or B%3==0 or (A+B)%3==0:
    ans = "Possible"
else:
    ans ="Impossible"
print(ans)

Submission status: Accepted

Solution code:
a,b = map(int, input().split())

if a % 3 == 0 or b %3 == 0 or (a+b)%3 == 0:
  print("Possible")
else:
  print("Impossible")

Submission status: Accepted

Solution code:
a,b = map(int, input().split())
print('Possible' if a%3==0 or b%3==0 or (a+b)%3==0 else 'Impossible')

Submission status: Accepted

Solution code:
A, B = map(int, input().split())
if 0 in [A%3, B%3, (A+B)%3]:
  print('Possible')
else:
  print('Impossible')

Submission status: Accepted

Solution code:
A,B = map(int,input().split())

if A%3==0 or B%3==0 or (A+B)%3==0:
  print("Possible")

else:
  print("Impossible")

Submission status: Accepted

Solution code:
A,B = map(int, input().split())
if (A + B)%3 == 0 or A%3 == 0 or B%3 == 0:
  print('Possible')
else:
  print('Impossible')

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
P = 'Possible'
if a % 3 == 0:
    print(P)
elif b % 3 == 0:
    print(P)
elif (a + b) % 3 == 0:
    print(P)
else:
    print('Impossible')

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
ans=[a%3,b%3,(a+b)%3]
if 0 in ans:
  print("Possible")
else:
  print("Impossible")

Submission status: Accepted

Solution code:
A, B = map(int, input().split())

if (A%3==0) or (B%3==0) or ((A+B)%3==0):
  print('Possible')
else:
  print('Impossible')

Submission status: Accepted

Solution code:
a,b = map(int,input().split())

if a%3 == 0 or b%3 == 0 or (a+b)%3 == 0:
  print("Possible")
else:
  print("Impossible")

Submission status: Accepted

Solution code:
def main():
    A = map(int, input().split())
    A = map(lambda x: x % 3, A)

    r = 0
    for x in A:
        r = (r + x) % 3
        if x == 0 or r == 0:
            print('Possible')
            return

    print('Impossible')


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush,heapify
from bisect import bisect_left,bisect_right 
import sys,math,itertools,fractions,pprint
sys.setrecursionlimit(10**8)
mod = 10**9+7
INF = float('inf')
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))

a,b = inpl()
if a%3==0 or b%3==0 or (a+b)%3==0 :
    print('Possible')
else:
    print('Impossible')

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
if (a+b) % 3 == 0 or a % 3 == 0 or b % 3 == 0:
	print("Possible")
else:
	print("Impossible")

Submission status: Accepted

Solution code:
a, b = map(int, input().split())

if a % 3 == 0 or b % 3 == 0 or (a + b) % 3 == 0:
  print("Possible")
else:
  print("Impossible")

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
if (a+b) % 3 != 0 and a % 3 != 0 and b % 3 != 0:
    print("Impossible")
else:
    print("Possible")

Submission status: Accepted

Solution code:
A, B = map(int, input().split())
ans = 'Impossible'
if A % 3 == 0:
  ans = 'Possible'
elif B % 3 == 0:
  ans = 'Possible'
elif (A+B) % 3 == 0:
  ans = 'Possible'
print(ans)

Submission status: Accepted

Solution code:
A,B = map(int,input().split())
if A%3==0 or B%3==0 or (A+B)%3==0:
    print("Possible")
else:
    print("Impossible")

Submission status: Accepted

Solution code:
import math
import string
import collections
from collections import Counter
from collections import deque
from decimal import Decimal
import sys


def readints():
    return list(map(int, input().split()))


def nCr(n, r):
    return math.factorial(n)//(math.factorial(n-r)*math.factorial(r))


def has_duplicates2(seq):
    seen = []
    for item in seq:
        if not(item in seen):
            seen.append(item)
    return len(seq) != len(seen)


def divisor(n):
    divisor = []
    for i in range(1, n+1):
        if n % i == 0:
            divisor.append(i)
    return divisor


# coordinates
dx = [-1, -1, -1, 0, 0, 1, 1, 1]
dy = [-1, 0, 1, -1, 1, -1, 0, 1]
a, b = map(int, input().split())
if a % 3 == 0 or b % 3 == 0 or (a+b) % 3 == 0:
    print('Possible')
else:
    print('Impossible')

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10 ** 7)
input = sys.stdin.readline
f_inf = float('inf')
mod = 10 ** 9 + 7


def resolve():
    a, b = map(int, input().split())
    print("Possible" if (a + b) % 3 == 0 or a % 3 == 0 or b % 3 == 0 else "Impossible")


if __name__ == '__main__':
    resolve()

Submission status: Accepted

Solution code:
A,B = map(int,input().split())

if A%3 == 0 or B%3 == 0 or (A+B)%3 == 0:
  print("Possible")
else:
  print("Impossible")

Submission status: Accepted

Solution code:
def resolve():
  a, b = map(int, input().split())
  if a % 3 == 0 or b % 3 == 0 or (a+b) % 3 == 0:
    print('Possible')
  else:
    print('Impossible')
  return

if __name__ == "__main__":
  resolve()

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().strip()

def resolve():
    a,b=map(int, input().split())
    if a%3==0 or b%3==0 or (a+b)%3==0:
        print('Possible')
    else:
        print('Impossible')
resolve()

Submission status: Accepted

Solution code:
import sys
from collections import Counter
from collections import deque
import heapq
import math
import fractions
import bisect
import itertools
def input(): return sys.stdin.readline().strip()
def mp(): return map(int,input().split())
def lmp(): return list(map(int,input().split()))

a,b=mp()
if a%3==0 or b%3==0 or (a+b)%3==0:
    print("Possible")
else:
    print("Impossible")

Submission status: Accepted

Solution code:
a,b = map(int, input().split())
print("Possible" if a%3==0 or b%3==0 or (a+b)%3==0 else "Impossible")

Submission status: Accepted

Solution code:
from sys import stdin
def main():
    #入力
    readline=stdin.readline
    a,b=map(int,readline().split())
    if a%3==0 or b%3==0 or (a+b)%3==0:
        print("Possible")
    else:
        print("Impossible")
        
if __name__=="__main__":
    main()

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
from collections import *

A, B = map(int, input().split())

if A%3==0 or B%3==0 or (A+B)%3==0:
    print('Possible')
else:
    print('Impossible')

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
if a % 3 == 0 or b % 3 == 0 or (a + b) % 3 == 0:
  print("Possible")
else:
  print("Impossible")

Submission status: Accepted

Solution code:
A, B = map(int, input().split())
if A % 3 == 0 or B % 3 == 0 or (A+B) % 3 == 0:
  print("Possible")
else:
  print("Impossible")

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
if a % 3 == 0 or b % 3 == 0 or (a+b) % 3 == 0:
    print('Possible')
else:
    print('Impossible')

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
if (a + b) % 3 == 0 or a % 3 == 0 or b % 3 == 0:
    print('Possible')
else:
    print('Impossible')

Submission status: Accepted

Solution code:
a, b = map(int, input().split())

if a % 3 == 0 or b % 3 == 0  or (a+b) % 3 == 0:
    print('Possible ')
else:
    print('Impossible ')

Submission status: Accepted

Solution code:
A, B= list(map(int, input().split())) 
if A%3 == 0 or B%3 == 0 or (A+B)%3 == 0:
  print("Possible")
else:
  print("Impossible")

Submission status: Accepted

Solution code:
def resolve():
    A, B = map(int, input().split())
    print("Impossible" if A%3 != 0 and B%3 != 0 and (A+B)%3 != 0 else "Possible")
resolve()

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
if (a + b) % 3 == 0 or a % 3 == 0 or b % 3 == 0:
  print('Possible')
else:
  print('Impossible')

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
if a%3 == 0 or b%3 == 0 or(a+b)%3 == 0:
    print("Possible")
else:
    print('Impossible')

Submission status: Accepted

Solution code:
A,B=map(int,input().split())
cookie=[A,B,A+B]
for i in range(3):
    cookie[i]%=3

if 0 in cookie:
    print("Possible")
else:
    print("Impossible")

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
if (a+b)%3==0 or a%3==0 or b%3==0:
	print('Possible')
else:
	print('Impossible')

Submission status: Accepted

Solution code:
import sys
import heapq, math
from itertools import zip_longest, permutations, combinations, combinations_with_replacement
from itertools import accumulate, dropwhile, takewhile, groupby
from functools import lru_cache
from copy import deepcopy

A, B = map(int, input().split())

print("Possible" if len(list(filter(lambda x: x % 3 == 0, [A, B, A + B]))) > 0 else "Impossible")

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
print(['Impossible','Possible'][a%3==0 or b%3==0 or (a+b)%3==0])

Submission status: Accepted

Solution code:
a,b=map(int, input().split())
print("Possible" if a%3==0 or b%3==0 or (a+b)%3==0 else "Impossible")