program Project1;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
 f,f1:text;
 w:array [1..7] of longint;
 h:array [1..7] of longint;
 u:array [1..7] of boolean;
 h1:array [1..7] of longint;
 w1:array [1..7] of longint;
i,t,p:longint;
o:boolean;

begin
assign(f,'box.in');
assign(f1,'box.out');
reset(f);
rewrite(f1);
for t:=1 to 6 do readln(f,w[t],h[t]);
for t:=1 to 6 do u[t]:=true;
i:=0;
o:=False;
for t:=1 to 5 do
for p:=t+1 to 6 do if u[p] then begin
if ((w[t]=w[p])and (h[t]=h[p])) or ((w[t]=h[p])and (h[t]=w[p])) then
begin
u[t]:=false;
u[p]:=false;
inc(i);
w1[i]:=w[t];
h1[i]:=h[t];
end;
end;
if i=3 then begin
if (w1[1]=w1[2]) and (h1[1]=h1[3]) and (h1[2]=w1[3]) then o:=true;
if (w1[1]=w1[2]) and (h1[1]=w1[3]) and (h1[2]=h1[3]) then o:=true;
if (w1[1]=h1[2]) and (h1[1]=w1[3]) and (h1[2]=h1[3]) then o:=true;
if (w1[1]=h1[2]) and (h1[1]=h1[3]) and (h1[2]=w1[3]) then o:=true;

if (w1[1]=w1[3]) and (h1[1]=h1[2]) and (h1[2]=w1[3]) then o:=true;
if (w1[1]=w1[3]) and (h1[1]=w1[2]) and (h1[2]=h1[3]) then o:=true;
if (w1[1]=h1[3]) and (h1[1]=w1[2]) and (h1[2]=w1[3]) then o:=true;
if (w1[1]=h1[3]) and (h1[1]=h1[2]) and (h1[2]=h1[3]) then o:=true;

end;
if o then write(f1,'POSSIBLE') else write(f1,'IMPOSSIBLE');
close(f);
close(f1);


  { TODO -oUser -cConsole Main : Insert code here }
end.
