uses
  SysUtils;

Type TBox = record
             X, Y: integer;
             used: boolean;
            end;

var  S, S1: array [1..6] of TBox;
     I, J, K: integer;
     FF: boolean;

function Eq(A, B: TBox):boolean;
begin
  Eq := TRUE;
  if (A.X = B.X) and (A.Y = B.Y) then Exit;
  if (A.X = B.Y) and (A.Y = B.X) then Exit;
  Eq := FALSE;
end;


begin
  assignfile(input, 'box.in');
  assignfile(output, 'box.out');
  reset(input);
  rewrite(output);
  ReadLn(S[1].X, S[1].Y); S[1].used := TRUE;
  ReadLn(S[2].X, S[2].Y); S[2].used := TRUE;
  ReadLn(S[3].X, S[3].Y); S[3].used := TRUE;
  ReadLn(S[4].X, S[4].Y); S[3].used := TRUE;
  ReadLn(S[5].X, S[5].Y); S[4].used := TRUE;
  ReadLn(S[6].X, S[6].Y); S[5].used := TRUE;

  for I := 1 To 5 do
  for J := I + 1 to 6 do
    if Eq(S[I], S[J]) then S[J].used := FALSE;
  K := 0;
  for I := 1 To 5 do
    begin
      if S[I].Used then begin Inc(K); S1[K] := S[I];end;
    end;
  if K <> 3 then
    begin
      WriteLn('IMPOSSIBLE');
    end
  else
    begin
      FF := FALSE;

      if not FF then
      if (S1[1].X = S1[2].X) then
        if (S1[1].Y = S1[3].X) and (S1[2].Y = S1[3].Y) then
          FF := TRUE;
      if not FF then
      if (S1[1].X = S1[2].X) then
        if (S1[1].Y = S1[3].Y) and (S1[2].Y = S1[3].X) then
          FF := TRUE;

      if not FF then
      if (S1[1].X = S1[2].Y) then
        if (S1[1].Y = S1[3].X) and (S1[2].X = S1[3].Y) then
          FF := TRUE;
      if not FF then
      if (S1[1].X = S1[2].Y) then
        if (S1[1].Y = S1[3].Y) and (S1[2].X = S1[3].X) then
          FF := TRUE;

//hdhdddhdghhhdf
      if not FF then
      if (S1[1].Y = S1[2].X) then
        if (S1[1].X = S1[3].X) and (S1[2].Y = S1[3].Y) then
          FF := TRUE;
      if not FF then
      if (S1[1].Y = S1[2].X) then
        if (S1[1].X = S1[3].Y) and (S1[2].Y = S1[3].X) then
          FF := TRUE;

      if not FF then
      if (S1[1].Y = S1[2].Y) then
        if (S1[1].X = S1[3].X) and (S1[2].X = S1[3].Y) then
          FF := TRUE;
      if not FF then
      if (S1[1].Y = S1[2].Y) then
        if (S1[1].X = S1[3].Y) and (S1[2].X = S1[3].X) then
          FF := TRUE;
      if FF then WriteLn('POSSIBLE') else writeLn('IMPOSSIBLE');
    end;

  closefile(input);
  closefile(output);
end.
 