var s, ans: string;
    a, b, n, k, t, min: int64;
    i: longint;
begin
    reset(input, 'shop.in');
    rewrite(output, 'shop.out');
    readln(s);
    readln(t);
    readln(a, b);
    readln(n);
    min := 2000000000;
    for i := 1 to n do
        begin
            readln(s);
            readln(k);
            if (t * a <= k * 100) and (k * 100 <= t * b) then
                if (k < min) then
                    begin
                        min := k;
                        ans := s;
                    end;
        end; 
    writeln(ans);
end.