{$APPTYPE CONSOLE}

uses
  SysUtils;

var x,y:array[0..5]of longint;
    i1,i2,i3,i4,i5,i6,i:longint;
    a,b,c:array[1..4]of longint;

begin
  { TODO -oUser -cConsole Main : Insert code here }
 assignFile(input,'box.in'); Reset(input);
 assignFile(output,'box.out'); Rewrite(output);
  for i:=0 to 5 do
    read(x[i],y[i]);

  for i1:=0 to 11 do
    for i2:=0 to 11 do
      if (i2 mod 6<>i1 mod 6) then
      for i3:=0 to 11 do
        if (i3 mod 6<>i1 mod 6) and (i3 mod 6<>i2 mod 6) then
        for i4:=0 to 11 do
          if (i4 mod 6<>i1 mod 6) and (i4 mod 6<>i2 mod 6) and (i4 mod 6<>i3 mod 6) then
          for i5:=0 to 11 do
            if (i5 mod 6<>i1 mod 6) and (i5 mod 6<>i2 mod 6) and (i5 mod 6<>i3 mod 6)
            and (i5 mod 6<>i4 mod 6) then
            for i6:=0 to 11 do
              if (i6 mod 6<>i1 mod 6) and (i6 mod 6<>i2 mod 6) and (i6 mod 6<>i3 mod 6)
              and (i6 mod 6<>i4 mod 6) and (i6 mod 6<>i5 mod 6)
              then
                begin
                  if i1<=5
                    then
                      begin
                        a[1]:=x[i1 mod 6];
                        c[1]:=y[i1 mod 6];
                      end
                    else
                      begin
                        a[1]:=y[i1 mod 6];
                        c[1]:=x[i1 mod 6];
                      end;
                  if i2<=5
                    then
                      begin
                        a[2]:=x[i2 mod 6];
                        b[1]:=y[i2 mod 6];
                      end
                    else
                      begin
                        a[2]:=y[i2 mod 6];
                        b[1]:=x[i2 mod 6];
                      end;
                   if i3<=5
                     then
                       begin
                         b[2]:=y[i3 mod 6];
                         c[3]:=x[i3 mod 6];
                       end
                     else
                       begin
                         b[2]:=x[i3 mod 6];
                         c[3]:=y[i3 mod 6];
                       end;
                   if i4<=5
                     then
                       begin
                         a[4]:=x[i4 mod 6];
                         b[3]:=y[i4 mod 6];
                       end
                     else
                       begin
                         a[4]:=y[i4 mod 6];
                         b[3]:=x[i4 mod 6];
                       end;
                   if i5<=5
                     then
                       begin
                         b[4]:=y[i5 mod 6];
                         c[4]:=x[i5 mod 6];
                       end
                     else
                       begin
                         b[4]:=x[i5 mod 6];
                         c[4]:=y[i5 mod 6];
                       end;
                   if i6<=5
                     then
                       begin
                         a[3]:=x[i6 mod 6];
                         c[2]:=y[i6 mod 6];
                       end
                     else
                       begin
                         a[3]:=y[i6 mod 6];
                         c[2]:=x[i6 mod 6];
                       end;
                    if (a[1]=a[2]) and (a[1]=a[3]) and (a[1]=a[4])
                     and (b[1]=b[2])and (b[1]=b[3]) and (b[1]=b[4])
                     and (c[1]=c[2])and (c[1]=c[3]) and (c[1]=c[4])
                       then
                         begin
                           writeln('POSSIBLE');
                           exit;
                         end;
                end;
  writeln('IMPOSSIBLE');

  close(input);
  close(output);
end.
