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

public class figure_mb {
    private static void myAssert(String msg, boolean exp) {
        if (!exp) {
            throw new AssertionError(msg);
        }
    }

    public static void main(String[] args) throws IOException {
        BufferedReader in = new BufferedReader(new FileReader("figure.in"));
        int n, m, x, y;
        {
            StringTokenizer st = new StringTokenizer(in.readLine().trim());
            n = Integer.parseInt(st.nextToken());
            m = Integer.parseInt(st.nextToken());
            x = Integer.parseInt(st.nextToken());
            y = Integer.parseInt(st.nextToken());
            myAssert("Extra tokens in line 1", !st.hasMoreTokens());
            myAssert("n is out of bounds", 0 <= n && n <= 99);
            myAssert("m is out of bounds", 0 <= m && m <= 99);
            myAssert("x is out of bounds", 0 <= x && x <= 99);
            myAssert("y is out of bounds", 0 <= y && y <= 99);
        }
        int[] min = new int[n];
        int[] max = new int[n];
        for (int i = 0; i < n; ++i) {
            String line = in.readLine().trim();
            int fwIndex = line.indexOf(" ");
            int lwIndex = line.lastIndexOf(" ");
            myAssert("Expected exactly one whitespace in line " + (i + 2), fwIndex >= 0 && fwIndex == lwIndex);
            min[i] = Integer.parseInt(line.substring(0, fwIndex));
            max[i] = Integer.parseInt(line.substring(fwIndex + 1));
            myAssert("min[" + (i + 1) + "] is out of bounds", 0 <= min[i] && min[i] <= 99);
            myAssert("max[" + (i + 1) + "] is out of bounds", 0 <= max[i] && max[i] <= 99);
        }
        in.close();

        int[] minCost = new int[m + 1];
        int[] tmp = new int[minCost.length];

        int infinity = 1000000000;

        Arrays.fill(minCost, infinity);
        minCost[0] = 0;

        for (int i = 0; i < n; ++i) {
            Arrays.fill(tmp, infinity);
            for (int w = min[i]; w <= max[i]; ++w) {
                int addCost = (w == 0) ? 0 : (w < 10) ? x : y;
                for (int t = 0; w + t < minCost.length; ++t) {
                    tmp[t + w] = Math.min(tmp[t + w], minCost[t] + addCost);
                }
            }
            int[] swap = tmp;
            tmp = minCost;
            minCost = swap;
        }

        PrintWriter out = new PrintWriter("figure.out");
        out.println(minCost[m] == infinity ? -1 : minCost[m]);
        out.close();
    }
}