#include <fstream>
#include <vector>
#include <string>
#include <algorithm>
#include <utility>
#include <map>
#include <math.h>

using namespace std;

typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int,int> PII;

#define REP(i,n) for (int i = 0; i < (n); i++)
#define IREP(i,n) for (i = 0; i < (n); i++)

int main()
{
   ifstream ifs("box.in");
   ofstream ofs("box.out");
   map<pair<int,int>,int > A;
   map<int,int> B;
   for (int i = 0; i < 6; ++i)
   {
      int v,w;
      ifs >> v >> w;
      if (w > v) swap(w,v);
      ++A[make_pair(v,w)];
      ++B[v];
      ++B[w];
   }

   bool possible = true;
   map<pair<int,int>,int >::iterator MI;
   vector<pair<int,int> > V;
   for (MI = A.begin(); MI != A.end(); ++MI)
   {
      if (MI->second % 2 != 0)
         possible = false;
      while (MI->second > 0)
      {
         MI->second -= 2;
         V.push_back(MI->first);
      }
   }
   sort(V.begin(),V.end());
   if (possible) do {
      possible = true;
      if (possible)
      {
         if ((V[0].first == V[1].first) || (V[0].first == V[1].second))
         {
             if (V[0].first == V[1].second)
                swap(V[1].first, V[1].second);
         }
         else if ((V[0].second == V[1].first) || (V[0].second == V[1].second))
         {
            if (V[0].second == V[1].second)
            {
               swap(V[0].first, V[0].second);
               swap(V[1].first, V[1].second);
            }
            else swap(V[0].first, V[0].second);
         }
         else possible = false;
      }


      if (possible)
      {
         if ((V[0].second ==  V[2].first) || (V[0].second == V[2].second)) 
         {
            if (V[0].second ==  V[2].second)
            {
               swap(V[2].first, V[2].second);
            }
         }
         else possible = false;
      }
      if (possible)
         possible = V[1].second==V[2].second;
      if (possible) break;
   } while (next_permutation(V.begin(),V.end()));
   if (possible)
      ofs << "POSSIBLE\n";
   else
      ofs << "IMPOSSIBLE\n";
   return 0;
}