program taskB;
{$APPTYPE CONSOLE}
const
   MAX = 6;
var
   fi,fo: TextFile;
   a: array [1..MAX,1..2] of longint;
   Eq: array [1..MAX] of longint;
   IsOK: boolean;
   b1,i1,i2: longint;
   Pair: array [1..3,1..2] of longint;
   RCnt: longint;
   IsLive: array [1..6] of boolean;

begin
   //init
   AssignFile(fi,'box.in');
   AssignFile(fo,'box.out');
   Rewrite(fo);
   Reset(fi);
   //init
   FillChar(Eq,SizeOf(Eq),0);
   //input
   for i1:=1 to MAX do
      begin
         Readln(fi,a[i1,1],a[i1,2]);
         //sort
         if a[i1,2]>a[i1,1] then
            begin
               //swap
               b1:=a[i1,2]; a[i1,2]:=a[i1,1]; a[i1,1]:=b1;
            end;
      end;

   //solve
   for i1:=1 to MAX do for i2:=1 to MAX do if (i1<>i2) AND (a[i1,1]=a[i2,1]) AND (a[i1,2]=a[i2,2]) then
      begin
         inc(Eq[i1]);
      end;
   //check
   IsOK:=true;
   for i1:=1 to MAX do if (Eq[i1] mod 2) <> 1 then
      begin
         IsOK:=false;
         break;
      end;
   //next
   if IsOK then
      begin
         //init
         RCnt:=0;
         for i1:=1 to 6 do IsLive[i1]:=true;

         for i1:=1 to 6 do if IsLive[i1] then
            begin
               for i2:=i1+1 to 6 do if (IsLive[i2]) AND (a[i1,1]=a[i2,1]) AND (a[i1,2]=a[i2,2]) then
                  begin
                     inc(RCnt);
                     Pair[RCnt,1]:=a[i1,1];
                     Pair[RCnt,2]:=a[i1,2];
                     IsLive[i2]:=false;
                     break;
                  end;
            end;
         //check 2
         if ((Pair[1,1]=Pair[2,1]) OR (Pair[1,1]=Pair[2,2]) OR
             (Pair[1,1]=Pair[3,1]) OR (Pair[1,1]=Pair[3,2])) AND
            ((Pair[1,2]=Pair[2,1]) OR (Pair[1,2]=Pair[2,2]) OR
             (Pair[1,2]=Pair[3,1]) OR (Pair[1,2]=Pair[3,2])) AND
            ((Pair[2,1]=Pair[1,1]) OR (Pair[2,1]=Pair[1,2]) OR
             (Pair[2,1]=Pair[3,1]) OR (Pair[2,1]=Pair[3,2])) AND
            ((Pair[2,2]=Pair[1,1]) OR (Pair[2,2]=Pair[1,2]) OR
             (Pair[2,2]=Pair[3,1]) OR (Pair[2,2]=Pair[3,2])) AND
            ((Pair[3,1]=Pair[1,1]) OR (Pair[3,1]=Pair[1,2]) OR
             (Pair[3,1]=Pair[2,1]) OR (Pair[3,1]=Pair[2,2])) AND
            ((Pair[3,2]=Pair[1,1]) OR (Pair[3,2]=Pair[1,2]) OR
             (Pair[3,2]=Pair[2,1]) OR (Pair[3,2]=Pair[2,2])) then Writeln(fo,'POSSIBLE')
                                                             else Writeln(fo,'IMPOSSIBLE')
         //for i1:=1 to 3 do if (Pair[i1])
      end
   else Writeln(fo,'IMPOSSIBLE');
   //deinit
   Close(fo);
   Close(fi);
end.
