{$DEFINE DMI}
{$DEFINE DO0}
{$DEFINE DEBUG}
{$IFDEF DEBUG}
{$B-,I+,N+,O-,Q+,R+,S+}
{$ELSE}
{$B-,I-,N+,O+,Q-,R-,S-}
{$ENDIF}
{$APPTYPE CONSOLE}
Program OlympSol;
uses SysUtils;

var i,j,p:integer;
a,b:array[1..6] of integer;

BEGIN
 assign (input, 'box.in'); reset (input);
 assign (output,'box.out'); rewrite (output);
 for i:=1 to 6 do begin
 read(a[i],b[i]);
 if a[i]>b[i] then begin
 p:=a[i];
 a[i]:=b[i];
 b[i]:=p;
 end;
 end;
 for i:=1 to 5 do
 for j:=i+1 to 6 do
 if (a[i]>a[j]) or ((a[i]=a[j]) and (b[i]>b[j])) then begin
 p:=a[i];
 a[i]:=a[j];
 a[j]:=p;
 p:=b[i];
 b[i]:=b[j];
 b[j]:=p;
 end;
 if (a[1]<>a[2]) or (b[1]<>b[2]) or (a[3]<>a[3]) or (b[3]<>b[4]) or
 (a[5]<>a[6]) or (b[5]<>b[6]) then writeln('IMPOSSIBLE')
 else
 if a[1]<>a[3] then writeln('IMPOSSIBLE')
 else
 if ((b[1]=a[5]) and (b[3]=b[5])) or ((b[1]=b[5]) and (b[3]=a[5]))
 then writeln('POSSIBLE')
 else writeln('IMPOSSIBLE');




END.
