#include<iostream>
int main()
{
      int A,B;
      cin>>A;
      cin>>B;    
       
	  if(A%3==0)
       {
                cout<<"possible";
                 return 0;
       }
       else if(B%3==0)
       {
                cout<<"possible";
                 return 0;
        }
        else if((A+B)%3==0)
       {
                 cout<<"possible";
                 return 0;
        }
      
       cout<<"impossible";
       return 0;
}