program ZadB;
{$Apptype Console}
uses
  Forms;

const
    infile='box.in';
    outfile='box.out';

Var X,Y,Kol:Array [0..10] of longint;
    x1,Ok,x2,y1,y2,i,j,k,l,count,m,n,met,xx,yy:longint;

procedure CallBad;
begin
    assign(output,outfile);
    rewrite(output);
    write('IMPOSSIBLE');
    close(output);
    halt(0);
end;

procedure init;
begin
    assign(input,infile);
    reset(input);
    Count:=0;
    for i:=1 to 6 do
    begin
        read(xx,yy);
        met:=0;
        for j:=1 to count do
            if ((xx=x[j]) and (yy=y[j])) or ((xx=y[j]) and (yy=x[j])) then
            begin
                met:=1;
                inc(kol[j]);
            end;
        if (met=0) then
        begin
            inc(count);
            if (xx<yy) then
            begin
                x[count]:=xx;
                y[count]:=yy;
                inc(kol[count]);
            end
                else
            begin
                y[count]:=xx;
                x[count]:=yy;
                inc(kol[count]);                
            end;
        end;
    end;
    for j:=1 to count do
        if (kol[j] mod 2<>0) then
            CallBad;
    close(input);
end;

procedure CallGood;
begin
    assign(output,outfile);
    rewrite(output);
    write('POSSIBLE');
    close(output);
    halt(0);
end;

procedure test(x1,y1,x2,y2:longint);
begin
    if ((x1=x2) and (y1=y2)) or ((x1=y2) and (y1=x2)) then
        CallGood;
end;

procedure Find;
begin
    Ok:=3;
    for i:=2 to 3 do
    begin
        if (i=3) then
            Ok:=2;

        if (x[1]=x[i]) then
        begin
            Test(y[1],y[i],x[ok],y[ok]);
        end
            else
        if (x[1]=y[i]) then
        begin
            Test(y[1],x[i],x[ok],y[ok]);
        end;
    end;
end;

procedure main;
begin
    if (count=1) then
        CallGood
            else
    if (count=2) then
    begin
        x2:=x[1];
        y2:=y[1];
        x1:=x[2];
        y1:=y[2];
    
        if (kol[1] div 2=1) then
        begin
            x1:=x[1];
            y1:=y[1];
            x2:=x[2];
            y2:=y[2];
        end;
        if (x1<>y1) then
            CallBad;
        if (x1<>x2) and (x1<>y2) then
            CallBad;
        CallGood;
    end
        else
    Find;
    CallBad;
end;

procedure done;
begin
    assign(output,outfile);
    rewrite(output);

    close(output);
end;

begin
    init;
    main;
    done;
end.
