program ProblemB;

{$APPTYPE CONSOLE}

uses
  SysUtils;

type TRect=record
       x,y:integer;
     end;
var V:array [1..10000] of integer;
    a:array [1..6] of TRect;
    num:array [1..6] of byte;

procedure ReadData;
var f:Text;
    i:integer;
begin
  Assign(f,'box.in'); Reset(f);
  FillChar(V,SizeOf(V),0);
  for i:=1 to 6 do
  begin
    ReadLn(f,a[i].x,a[i].y);
    inc(V[a[i].x]); inc(V[a[i].y]);
  end;
  Close(f);
end;

procedure WriteAnswer(s:string);
var f:Text;
begin
  Assign(f,'box.out'); Rewrite(f);
  Write(f,s);
  Close(f);
end;

function Eq(i,j:integer):Boolean;
begin
  Eq:=(a[i].x=a[j].x) and (a[i].y=a[j].y) or
      (a[i].x=a[j].y) and (a[i].y=a[j].x);
end;

function GetPair(index:integer):integer;
var i:integer;
begin
  for i:=index+1 to 6 do
    if (num[i]=0) and Eq(index,i) then
    begin
      GetPair:=i;
      Exit;
    end;
  GetPair:=-1;
end;

procedure Process;
var i,k,k1:integer;
    n1:byte;
begin
  for i:=1 to 10000 do
    if (V[i] mod 4)<>0 then
    begin
      WriteAnswer('IMPOSSIBLE');
      Exit;
    end;
  FillChar(num,SizeOf(num),0); n1:=1;
  for i:=1 to 3 do
  begin
    k:=1;
    while (num[k]<>0) do inc(k);
    num[k]:=n1;
    k1:=GetPair(k);
    if k1=-1 then
    begin
      WriteAnswer('IMPOSSIBLE');
      Exit;
    end;
    num[k1]:=n1;
    inc(n1);
  end;
  WriteAnswer('POSSIBLE');
end;

begin
  ReadData;
  Process;
end.
