{$APPTYPE CONSOLE}

var
  a:array[1..6,1..2] of integer;
  t,i,j:integer;
  f1,f2,f3:boolean;

begin
  assign(input,'box.in'); reset(input);
  assign(output,'box.out'); rewrite(output);

  for i:=1 to 6 do
  begin
    for j:=1 to 2 do
      read(a[i,j]);
    if a[i,1]>a[i,2] then
    begin
      t:=a[i,1]; a[i,1]:=a[i,2]; a[i,2]:=t;
    end;
  end;

  for i:=1 to 5 do
    for j:=i+1 to 6 do
      if (a[i,1]>a[j,1]) or ((a[i,1]=a[j,1]) and (a[i,2]>a[j,2])) then
      begin
        t:=a[i,1]; a[i,1]:=a[j,1]; a[j,1]:=t;
        t:=a[i,2]; a[i,2]:=a[j,2]; a[j,2]:=t;
      end;

  f1:=(a[1,1]=a[2,1]) and (a[1,2]=a[2,2]);
  f2:=(a[3,1]=a[4,1]) and (a[3,2]=a[4,2]);
  f3:=(a[5,1]=a[6,1]) and (a[5,2]=a[6,2]);

  if f1 and f2 and f3 then
    write('POSSIBLE')
  else
    write('IMPOSSIBLE')
end.
