{$R+,Q+,S+,I+}
{$APPTYPE CONSOLE}

var
  a,b: array [1..6] of longint;
  i,j,n,t: longint;

procedure over(ok: boolean);
begin
  if ok
    then writeln('POSSIBLE')
    else writeln('IMPOSSIBLE');
  close(input);
  close(output);
  halt;
end;

procedure swp(var a,b: longint);
var t: longint;
begin
  t:=a;
  a:=b;
  b:=t;
end;

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 swp(a[i],b[i]);
  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
        swp(a[i],a[j]);
        swp(b[i],b[j]);
      end;

  if not ((a[1]=a[2])and(b[1]=b[2])and
          (a[3]=a[4])and(b[3]=b[4])and
          (a[5]=a[6])and(b[5]=b[6]))
     then over(false);

  if (a[1]=a[3])and(b[1]=a[5])and(b[3]=b[5])or
     (a[1]=a[3])and(b[1]=b[5])and(b[3]=a[5])or
     (a[1]=b[3])and(b[1]=a[5])and(a[3]=b[5])or
     (a[1]=b[3])and(b[1]=b[5])and(a[3]=a[5])
     then over(true);

  swp(a[1],b[1]);

  if (a[1]=a[3])and(b[1]=a[5])and(b[3]=b[5])or
     (a[1]=a[3])and(b[1]=b[5])and(b[3]=a[5])or
     (a[1]=b[3])and(b[1]=a[5])and(a[3]=b[5])or
     (a[1]=b[3])and(b[1]=b[5])and(a[3]=a[5])
     then over(true);

  over(false);
end.
 