#include <fstream>
#include <algorithm>

using namespace std;

ifstream fin( "box.in" );
ofstream fout( "box.out" );

int A[6], B[6], u[6];

void ReadData()
{
   int i;
   for( i = 0; i<6; ++i )
   {
      fin >> A[i] >> B[i];
      if( A[i]>B[i] )
         swap( A[i], B[i] );
   }
}

int Find( int k )
{
   int i;
   for( i = 0; i<6; ++i )
      if( !u[i] && A[i]==A[k] && B[i]==B[k] )
         return i;
   return -1;
}

int Find2( int s )
{
   int i;
   for( i = 0; i<6; ++i )
      if( !u[i] && A[i]==s )
         return i;
   return -1;
}

bool Work()
{
   int i, k;
   for( i = 0; i<6; ++i )
   {
      if( u[i] )
         continue;
      u[i] = 1;
      k = Find( i );
      if( k==-1 )
         return false;
      u[k] = 2;
   }
   for( i = 0; i<6; ++i )
      if( u[i]==2 )
         for( k = i+1; k<6; ++k )
            if( u[k]==1 )
            {
               swap( A[i], A[k] );
               swap( B[i], B[k] );
               swap( u[i], u[k] );
               break;
            }
   memset( u, 0, sizeof(u) );
   for( i = 0; i<3; ++i )
      A[i+3] = B[i];
   for( i = 0; i<6; ++i )
   {
      if( u[i] )
         continue;
      u[i] = 1;
      k = Find2( A[i] );
      if( k==-1 )
         return false;
      u[k] = 1;
   }
   return true;
}

void Output( bool res )
{
   fout << ( res ? "POSSIBLE" : "IMPOSSIBLE" );
}

int main()
{
   ReadData();
   Output( Work() );
   return 0;
}
