program pil_11_55(input,output);
var
  prev, i, n : integer;

function IsSimple(x : integer) : boolean;
label 9999;
var
  i, max : integer;
begin
  max := trunc(sqrt(x));
  if x mod 2 = 0 then begin
    IsSimple := false;
    goto 9999;
  end;
  i := 3;
  while i<=max do begin
    if x mod i = 0 then begin
      IsSimple := false;
      goto 9999;
    end;
    i := i+2;
  end;
  IsSimple := true;
9999:;
end;

begin
  Write('Input n : ');
  Read(n);
  prev := 2;
  i := 3;
  while i <=n do begin
    if IsSimple(i) then begin
      if i-prev=2 then WriteLn(prev, ', ', i);
      prev := i;
    end;
    i := i + 2;
  end;
end.
