import java.io.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class figure_sm_slow2 {

	int[] d, a, b;
	int best, x, y;

	void gen(int pos, int m, int cost) {
		if (m < 0) {
			return;
		}
		if (pos == d.length) {
			if (m == 0) {
				for (int i = 0; i < d.length; i++) {
					if (b[i] > d[i] || d[i] > a[i]) {
						return;
					}
				}
				best = Math.min(best, cost);
			}
			return;
		}
		for (int i = 0; i <= m; i++) {
			d[pos] = i;
			gen(pos + 1, m - i, cost + (i < 10 ? (i == 0 ? 0 : x) : y));
		}
	}

	void solve() {
		int n = nextInt();
		int m = nextInt();
		x = nextInt();
		y = nextInt();
		a = new int[n];
		b = new int[n];
		for (int i = 0; i < a.length; i++) {
			b[i] = nextInt();
			a[i] = nextInt();
		}
		d = new int[n];
		best = Integer.MAX_VALUE;
		gen(0, m, 0);
		if (best == Integer.MAX_VALUE) {
			best = -1;
		}
		System.out.println(best);
		out.println(best);
	}

	BufferedReader br;
	PrintWriter out;
	StringTokenizer st;

	void run() {
		try {
			br = new BufferedReader(new FileReader("figure.in"));
			out = new PrintWriter(new FileWriter("figure.out"));
			solve();
			out.close();
		} catch (IOException e) {
			e.printStackTrace();
			System.exit(1);
		}
	}

	String nextToken() {
		try {
			while (st == null || !st.hasMoreTokens()) {
				st = new StringTokenizer(br.readLine());
			}
			return st.nextToken();
		} catch (Exception e) {
			return "0";
		}
	}

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

	public static void main(String[] args) {
		new figure_sm_slow2().run();
	}
}
