program ProjectA;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
f1,f2:textfile;
a,b:array[1..6,1..2] of integer;
i,j,k,l:integer;
index1,index2:integer;
begin
Assign(f1,'box.in');
Assign(f2,'box.out');
Reset(f1);
Rewrite(f2);
for i:=1 to 6 do
begin
for j:=1 to 2 do
begin
read(f1,a[i,j]);
end;
readln(f1);
end;
for k:=1 to 5 do
begin
for i:=k+1 to 6 do
begin
for j:=1 to 2 do
begin
if a[k,1]=a[i,j] then
begin
index1:=j;
case j of
1: if a[k,2]=a[i,2] then
   begin
    a[k,1]:=0; a[k,2]:=0; a[i,1]:=0; a[i,2]:=0;
   end;
2: if a[k,2]=a[i,1] then
   begin
    a[k,1]:=0; a[k,2]:=0; a[i,1]:=0; a[i,2]:=0;
   end;
end;
end;
end;
end;
end;
index1:=0;
for i:=1 to 6 do
begin
for j:=1 to 2 do
begin
 if a[i,j]=0 then
 index1:=index1+1;
end;
end;
if index1=12 then
write(f2,'POSSIBLE')
ELSE
write(f2,'IMPOSSIBLE');
close(f1);
close(f2);
end.
