program box;

{$APPTYPE CONSOLE}

uses
  SysUtils;
var
f,ff:textfile;
a:array[1..6,1..2] of integer;
b:array[1..6,1..2] of integer;
i,l,bb:integer;
begin
assign(f,'box.in');
reset(f);
assign(ff,'box.out');
rewrite(ff);
bb:=1;
for i:=1 to 6 do read(f,a[i,1],a[i,2]);
for i:=1 to 6 do for l:=1 to 6 do
    begin
    if a[i,1]=a[l,1] then inc(b[i,1]);
    if a[i,1]=a[l,2] then inc(b[i,1]);
    if a[i,2]=a[l,1] then inc(b[i,2]);
    if a[i,2]=a[l,2] then inc(b[i,2]);
    end;
for i:=2 to 6 do for l:=1 to 2 do
    begin
    if (a[1,1]<>a[i,1]) and (a[1,1]<>a[i,2]) and (a[1,2]<>a[i,1]) and (a[1,2]<>a[i,2]) then bb:=0;
    end;




for i:=1 to 6 do for l:=1 to 2 do
    begin
    if b[i,l]<4 then bb:=0;
    end;
if bb=1 then writeln(ff,'POSSIBLE');
if bb=0 then writeln(ff,'IMPOSSIBLE');
closefile(f);
closefile(ff);
end.
