Uses SysUtils, Math;
var test_number, n, k, i: longint;

procedure print(n, k: longint);
var s: string;
begin
	if (test_number < 10) then s :='0' + IntToStr(test_number)
	else s := IntToStr(test_number);
	rewrite(output, s);
	writeln(n, ' ', k);
	inc(test_number);
	close(output);
end;

procedure genMax(a: longint);
begin
    n := a;
    k := n;
    print(n, k);
end;

procedure genMin(a: longint);
begin
    n := a;
    k := 2 + random(5);
    k := min(n, k);
    print(n, k);
end;

procedure genRand(a: longint);
begin
    n := random(a div 2) + a div 2;
    k := a div 2 + random(a div 2) * (random(101) - 50) div 50;
    k := min(k, n);
    print(n, k)
end;

begin
	randomize;
	randseed := 579279;
    test_number := 1;
    
    genMax(3);
    genMin(5);
    genRand(10);
    genMax(100);
    genMin(100);
    genMin(1000);
    genMAx(1000);
    genMin(500);
    genMin(200);
    for i := 1 to 10 do
        genRand(1000 div i);
    genRand(1000);
    genRand(5000);


    genMin(10000);
    genMAx(10000);
    for i := 1 to 8 do
        genRand(10000 div i + 2000);

    genMin(50000);
    genMAx(50000);
    for i := 1 to 8 do
        genRand(50000 - i * 2000);


    genMin(100000);
    genMAx(100000);
    for i := 1 to 7 do
        genRand(100000 - i * 5000);
end.




end.