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 = 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:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7

A, B = MAP()

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 = [int(x) for x in input().split()]

print("Possible" if ((a + b) % 3) * (a % 3) * (b % 3) == 0 else "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
input = sys.stdin.readline
A,B = [int(i) for i in input().split()]
ma = A % 3
mb = B % 3
mp = (A+B) % 3
if ma == 0 or mb == 0 or mp == 0 :
    print("Possible")
else :
    print("Impossible")

Submission status: Accepted

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

if A%3 and B%3 and (A+B)%3:
    print("Impossible")
else:
    print("Possible")

Submission status: Accepted

Solution code:
from sys import stdin
A,B = [int(x) for x in stdin.readline().rstrip().split()]
f = False
if A % 3 == 0:
    f = True
if B % 3 == 0:
    f = True
if (A+B) % 3 == 0:
    f = True
if f:
    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:
  r = "Possible"
else:
  r = "Impossible"

print(r)

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=list(map(int, input().split()))
if a%3!=0 and b%3!=0:
  if (a+b)%3==0:
    print("Possible")
  else:
    print("Impossible")
else:
  print("Possible")

Submission status: Accepted

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

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:
sheet = input().split()
sheet_i = [int(s) for s in sheet]
a, b = sheet_i

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

Submission status: Accepted

Solution code:



import numpy as np
import fractions as fra

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

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:
N = list(map(int, input().split()))
N.append(sum(N))
ans = False
for i in N:
  if i%3 == 0:
    ans = True
    break
if ans:
  print("Possible")
else:
  print("Impossible")

Submission status: Accepted

Solution code:
import sys


def solve(inp):
    A = list(map(int, inp.readline().strip().split(' ')))

    if A[0] % 3 == 0 or A[1] % 3 == 0 or sum(A) % 3 == 0:
        return "Possible"
    else:
        return "Impossible"


def main():
    result = solve(sys.stdin)
    if result:
        print(result)


if __name__ == '__main__':
    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())
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())
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:
import math
import queue
import bisect
import heapq
import time
import itertools

mod = int(1e9+7)

def swap(a,b):
    return (b,a)

def gcd(a,b): #最大公約数
    if (a<b):
        a,b = swap(a,b)
    if (b==0):
        return a
    else:
        return gcd(b,a%b)

def lcm(a,b): #最小公倍数
    return a/gcd(a,b)*b

def divisors(a): # 約数列挙
    divisors = []
    for i in range(1,int(a**0.5)+1):
        if a%i==0:
            divisors.append(i)
            if i!=a//i:
                divisors.append(a//i)
    return divisors

def is_prime(a): #素数判定
    if a<2:
        return False
    elif a==2:
        return True
    elif a%2==0:
        return False
    sqrt_num = int(a**0.5)
    for i in range(3,sqrt_num+1,2):
        if a%i==0:
            return False
    return True

def prime_num(a): #素数列挙
    pn = [2]
    for i in range(3,int(a**0.5),2):
        prime = True
        for j in pn:
            if i%j==0:
                prime = False
                break
        if prime:
            pn.append(i)
    return pn

def prime_fact(a): #素因数分解
    sqrt = math.sqrt(a)
    res = []
    i = 2
    if is_prime(a):
        res.append(a)
    else:
        while a!=1:
            while a%i==0:
                res.append(i)
                a //= i
            i += 1
    return res

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")
    return

if __name__=='__main__':
    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:
import sys
input = sys.stdin.readline
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())

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a, b  = map(lambda x: int(x),  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 and  b%3 and (a+b)%3:
    print('Impossible')
else:
    print('Possible')

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*(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('Impossible' if a%3 and b%3 and (a+b)%3 else 'Possible')

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:
import sys
a, b = map(int, input().split())
if a != 0 and a%3 == 0:
	print("Possible")
	sys.exit()
if b != 0 and b%3 == 0:
	print("Possible")
	sys.exit()
if a != 0 and b != 0 and (a+b)%3 == 0:
	print("Possible")
	sys.exit()

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())

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 % 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

a, b = map(int, sys.stdin.readline().split())

def main():
    return 'Impossible' if a % 3 and b % 3 and (a + b) % 3 else 'Possible'

if __name__ == '__main__':
    ans = main()
    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())
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+b)%3 == 0 or a%3 == 0 or b%3 == 0 else 'Impossible')

Submission status: Accepted

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

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 print('Impossible')

Submission status: Accepted

Solution code:
import sys

a, b = map(int, sys.stdin.readline().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:
A,B = map(int,input().split())
ans_list = [A%3,B%3,(A+B)%3]
print('Possible') if 0 in ans_list else print('Impossible')

Submission status: Accepted

Solution code:
a = input().split()
if int(a[0]) % 3 == 0 or int(a[1]) % 3 == 0 or (int(a[0]) + int(a[1])) % 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):
    ans = 'Possible'
else:
    ans = 'Impossible'

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A, B = map(int,input().split())
soma = A+B
if A%3 == 0:
    print('Possible')
elif B%3 == 0:
    print ('Possible')
elif soma%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 + b) % 3 == 0 or a % 3 == 0 or b % 3 == 0:
  ans = 'Possible'
else:
  ans = 'Impossible'
  
print(ans)

Submission status: Accepted

Solution code:
A, B = list(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())

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

print(result)

Submission status: Accepted

Solution code:
# A - Sharing Cookies
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()]
print('Possible' if True in (A % 3 == 0, B % 3 == 0, (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 = 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

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]

def main():
    a,b=MI()
    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())
print("Possible" if (A+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 + b) % 3 == 0 or a % 3 == 0 or 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 and b%3 and (a+b)%3:
  print("Impossible")
else:
  print("Possible")

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 any(map(lambda x: x % 3 == 0, (A, B, A + B))):
    print("Possible")
else:
    print("Impossible")

Submission status: Accepted

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

c=a+b

if c%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())
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 = [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=list(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 % 3 == 0 or B % 3 == 0 or (A + B) % 3 == 0:
    ans = "Possible"
else:
    ans = "Impossible"

print(ans)

Submission status: Accepted

Solution code:
# ABC067a
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)

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().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+B) % 3 == 0 or A % 3 == 0 or B % 3 == 0:
    print("Possible")
else:
    print("Impossible")

Submission status: Accepted

Solution code:
from sys import stdin

a,b = [int(x) for x in stdin.readline().rstrip().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())
ans = "Impossible"
if a % 3 == 0 or b % 3 == 0 or (a + b) % 3 == 0:
  ans = "Possible"
print(ans)

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:
# -*- coding: utf-8 -*-
import math

#入力
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"][a*b*(a+b)%3==0]+"ossible")

Submission status: Accepted

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

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
input = sys.stdin.readline
A, B = map(int, input().split())
if (A % 3) and (B % 3) and ((A + B) % 3):
  print("Impossible")
else: print("Possible")

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 examA():
    A, B = LI()
    if A%3==0 or B%3==0 or (A+B)%3==0:
        ans = "Possible"
    else:
        ans = "Impossible"
    print(ans)



import sys
import copy
import bisect
import heapq
from collections import Counter,defaultdict,deque
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def S(): return sys.stdin.readline().strip()
mod = 10**9 + 7
inf = float('inf')

examA()

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 not (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=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 = 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+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())

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

m = min(a,b,c)

if m == 0:
    print("Possible")
else:
    print("Impossible")

Submission status: Accepted

Solution code:
A,B = map(int,input().split())
print('Possible' if any([True if val%3==0 else False for val 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())
if A%3 and B%3 and (A+B)%3:
    print("Impossible")
else:
    print("Possible")

Submission status: Accepted

Solution code:
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())
print('Possible' if A%3==0 or B%3==0 or (A+B)%3==0 else 'Impossible')

Submission status: Accepted

Solution code:
#Sharing Cookies
A, B = map(int, input().split())
S = A+B
if A%3 == 0:
    print("Possible")
elif B%3 == 0:
    print("Possible")
elif S%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)%3==0 or a%3==0 or b%3==0 else print('Impossible')

Submission status: Accepted

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

a, b = [int(x) for x in input().split()]
ans = "Possible" if a % 3 == 0 or b % 3 == 0 or (a + b) % 3 == 0 else '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 - Sharing Cookies
a, b = [int(s) for s 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:
# -*- 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:
#067a
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 and b%3 != 0 and (a+b)%3 != 0:
    print('Impossible')
else:
    print('Possible')

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%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())
print('Possible' if A*B*(A+B)%3==0 else 'Impossible')

Submission status: Accepted

Solution code:
#n = int(input())
#n,k = map(int,input().split())
#x = list(map(int,input().split()))

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 != 0 and (a + b) % 3 == 0:
  print("Possible")
elif a != 0 and a % 3 == 0:
  print("Possible")
elif b != 0 and 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:
# ABC067 A - Sharing Cookies
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())
x='Impossible'
if a%3==0 or b%3==0 or (a+b)%3==0:
  x='Possible'
print(x)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
print('Possible' if any(
    [not(a % 3), not(b % 3), not((a+b) % 3)]) else 'Impossible')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
if not a%3 or not b%3 or not (a+b)%3:
    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:
#2019/10/10
A, B = map(int, open(0).read().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:
	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 = list(map(int,input().split()))
if(a[0]%3==0):
    print("Possible")
elif(a[1]%3==0):
    print("Possible")
elif((a[0]+a[1])%3==0):
    print("Possible")
else:
    print("Impossible")

Submission status: Accepted

Solution code:
a = list(map(int,input().split()))
A = a[0]
B = a[1]

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, raw_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 and b % 3 != 0 and (a+b) % 3 != 0:
	print('Impossible')
else:
	print('Possible')

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:
  print("Possible")
elif A % 3 == 0:
  print("Possible")
elif 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')