// Задача "Фигуоное катание"
// 3-я личная Интернет-олимпиада сезона 2009-2010
// Автор задачи: Сергей Мельников, svembox@gmail.com
// Автор решения: Владимир Ульянцев, ulyantsev@rain.ifmo.ru

uses
    sysutils, math;
type
    int = longint;
const
    MAXN = 99;
    INF = MAXN * MAXN * MAXN;

var
    n, m, x, y : int;
    a, b : array [0..MAXN] of int;
    i, j, k : int;

    c : array [0..MAXN, 0..MAXN] of int;

function cost(i : int) : int;
begin
    if (i = 0) then begin
        result := 0;
    end else if (i < 10) then begin
        result := x;
    end else begin
        result := y;
    end;
end;

begin
    reset(input, 'figure.in');
    rewrite(output, 'figure.out');

    read(n, m, x, y);
    assert((0 <= n) and (n <= MAXN));
    assert((0 <= m) and (m <= MAXN));
    assert((0 <= x) and (x <= MAXN));
    assert((0 <= y) and (y <= MAXN));

    for i := 1 to n do begin
        read(b[i], a[i]);
        assert((0 <= a[i]) and (a[i] <= MAXN));
        assert((0 <= b[i]) and (b[i] <= MAXN));
    end;

    // проверка крайнего случая
    if (m = 0) then begin
        writeln(0);
        halt;
    end;

    // инициализация динамики
    for i := 0 to m do begin
        for j := 0 to n do begin
            c[i][j] := INF;
        end;
    end;

    c[0][0] := 0;
    for i := 1 to n do begin
        if (b[i] = 0) then begin
            c[0][i] := 0;
        end else begin
            break;
        end; 
    end;

    // динамика
    for i := 1 to m do begin
        for j := 1 to n do begin
            for k := b[j] to min(a[j], i) do begin
                if (c[i][j] > c[i - k][j - 1] + cost(k)) then begin
                    c[i][j] := c[i - k][j - 1] + cost(k);
                end;
            end;
        end;
    end;

    if (c[m][n] = INF) then
        writeln(-1)
    else
        writeln(c[m][n]);
end.
