program SAMPLE;

{$APPTYPE CONSOLE}

uses
  SysUtils;

type
  typ=record
    x,y:integer;
  end;

var f:text;
    a:array[1..6] of typ;
    pas:string;
    c,c1,min:typ;
    i,j:integer;




  procedure reading;
begin
  assign(f,'box.in');
  reset(f);
  for i:=1 to 6 do
    readln(f,a[i].x,a[i].y);
  close(f);
end;

procedure writing;
begin
  assign(f,'box.out');
  rewrite(f);
  write(f,pas);
  close(f);
end;


procedure swap;
begin
  for i:=1 to 6 do
    if a[i].x>a[i].y then
                       begin
                         c.x:=a[i].x;
                         a[i].x:=a[i].y;
                         a[i].y:=c.x;
                       end;
end;

procedure sort1;
begin
  for j:=1 to 5 do
    for i:=j to 6 do
      if a[i].x<a[j].x then
                         begin
                           c:=a[j];
                           a[j]:=a[i];
                           a[i]:=c;
                         end;
end;


procedure sort2;
begin
  for j:=1 to 3 do
    for i:= j to 4 do
      if a[i].y< a[j].y then
                          begin
                            c1:=a[i];
                            a[i]:=a[j];
                            a[j]:=c1;
                          end;
end;


procedure working;
begin
  swap;
  sort1;
  sort2;
  if (a[1]=a[2]) and (a[3]=a[4]) and (a[5]=a[6])and
     (a[1].x=a[3].x)and(a[1].y=a[5].x)and(a[3].y=a[5].y)then
                                                          begin
                                                            pas:='POSSIBLE';
                                                            writing;
                                                          end
                                                         else
                                                           begin
                                                             pas:='IMPOSSIBLE';
                                                             writing;
                                                           end;  
end;



begin

  reading;
  working;
  writing;


end.
