import java.io.*;
import java.util.*;

public class shop_at implements Runnable {
	public static void main(String[] args) {
		new shop_at().run();
	}

	BufferedReader br;
	StringTokenizer in;
	PrintWriter out;

	public String nextToken() throws IOException {
		while (in == null || !in.hasMoreTokens()) {
			in = new StringTokenizer(br.readLine());
		}
		return in.nextToken();
	}

	public int nextInt() throws IOException {
		return Integer.parseInt(nextToken());
	}

	public long nextLong() throws IOException {
		return Long.parseLong(nextToken());
	}

	public double nextDouble() throws IOException {
		return Double.parseDouble(nextToken());
	}

	public void solve() throws IOException {
		HashSet<String> used = new HashSet<String>();
		HashSet<Integer> ucost = new HashSet<Integer>();
		String name = br.readLine();
		assert (name.length() <= 20);

		int initCost = nextInt();
		assert (initCost <= 1e9 && 1 <= initCost);

		int a = nextInt();
		int b = nextInt();
		assert (1 <= a && 1 <= b && a <= b && b <= 100);

		int n = nextInt();
		assert (n <= 1000);

		int minCost = Integer.MAX_VALUE;
		String bestItem = "";

		double low = initCost / 100.0 * a;
		double high = initCost / 100.0 * b;

		for (int i = 0; i < n; i++) {
			name = br.readLine();
			int cost = nextInt();
			
			assert (name.length() <= 20);
			assert (cost <= 1e9 && 1 <= cost);
			assert (!used.contains(name));
			assert (!ucost.contains(cost));
			used.add(name);
			ucost.add(cost);
			
			if (low <= cost && cost <= high && cost < minCost) {
				minCost = cost;
				bestItem = name;
			}
		}
		assert (minCost != Integer.MAX_VALUE);
		out.println(bestItem);
	}

	public void run() {
		try {
			Locale.setDefault(Locale.US);
			br = new BufferedReader(new FileReader("shop.in"));
			out = new PrintWriter("shop.out");

			solve();

			out.close();
			br.close();
		} catch (IOException e) {
			e.printStackTrace();
			System.exit(1);
		}
	}
}
