program p_e;

{$APPTYPE CONSOLE}

uses
  SysUtils;
var
  fin,fout:text;
  a,b,k:integer;
  t:boolean;
  mat:array [1..10000] of integer;
begin
  { TODO -oUser -cConsole Main : Insert code here }
  AssignFile(fin,'box.in');
  AssignFile(fout,'box.out');
  Reset(fin);
  Rewrite(fout);
  For k:=1 to 6 do
    begin
      readln(fin,a,b);
      if a<>b then
        begin
          inc(mat[a]);
          inc(mat[b])
        end;
    end;
  t:=true;
  For k:=1 to 10000 do
    begin
      if mat[k]mod 4<>0 then t:=false;
    end;
  if t then Writeln(fout,'POSSIBLE')
       ELSE Writeln(fout,'IMPOSSIBLE');  
  CloseFile(fin);
  CloseFile(fout);
end.
