program gen_random;

{$APPTYPE CONSOLE}

uses SysUtils;

const
	MAXN = 1000000000;

var
  i, a, b: integer;
  
begin
	i:=1;
	while (FileExists(IntToStr(i)+'.in')) do inc(i);
	rewrite(output,IntToStr(i)+'.in');
	
  randomize;
  
  if paramcount>0 then a:= strtoint(paramstr(1)) else a:=random(MAXN)+1;
  if paramcount>1 then b:= strtoint(paramstr(2)) else b:=random(MAXN)+1;
  
  if a>b then begin
  	i:=a;
  	a:=b;
  	b:=i;
  end;
  
  writeln(a,' ',b);
  
  sleep(20);
end.