program Project2;

{$APPTYPE CONSOLE}

uses
  SysUtils;

type
  arr=array [1..2] of integer;
var
  s:array [1..6] of arr;
  f:text;
  i,q:integer;
procedure sort;
var ip,c:integer;
begin
  for ip:=1 to 6 do
  begin
    if s[ip,1]>s[ip,2] then
    begin
      c:=s[ip,1];
      s[ip,1]:=s[ip,2];
      s[ip,2]:=c;
    end;
  end;
end;
function find(x1, x2, index:integer):boolean;
var ip:integer;
begin
  find:=false;
  for ip:=1 to 6 do
  begin
    if ip<>index then
    if x1=s[ip,1] then
      if x2=s[ip,2] then
      begin
        find:=true;
        break;
      end;
  end;
end;
begin
  assign(f,'box.in');
  reset(f);
  for i:=1 to 6 do
    readln(f, s[i,1],s[i,2]);
  close(f);
  sort;
  q:=0;
  for i:=1 to 6 do
    if find(s[i,1],s[i,2],i) then inc(q);
  assign(f,'box.out');
  rewrite(f);
  if q=6 then writeln(f,'POSSIBLE')
    else writeln(f,'IMPOSSIBLE');
  close(f);
end.
