Problem: As we all know, Dart is some kind of creature from Upside Down world. For simplicity, we call their kind pollywogs. Dart and x - 1 other pollywogs are playing a game. There are n stones in a row, numbered from 1 through n from left to right. At most 1 pollywog may be sitting on each stone at a time. Initially, the pollywogs are sitting on the first x stones (one pollywog on each stone).

<image>

Dart and his friends want to end up on the last x stones. At each second, the leftmost pollywog should jump to the right. A pollywog can jump at most k stones; more specifically, a pollywog can jump from stone number i to stones i + 1, i + 2, ... i + k. A pollywog can't jump on an occupied stone. Jumping a distance i takes ci amounts of energy from the pollywog. 

Also, q stones are special Each time landing on a special stone p, takes wp amounts of energy (in addition to the energy for jump) from the pollywog. wp could be negative, in this case, it means the pollywog absorbs |wp| amounts of energy.

Pollywogs want to spend as little energy as possible (this value could be negative). 

They're just pollywogs, so they asked for your help. Tell them the total change in their energy, in case they move optimally.

Input

The first line of input contains four integers, x, k, n and q (1 ≤ x ≤ k ≤ 8, k ≤ n ≤ 108, 0 ≤ q ≤ min(25, n - x)) — the number of pollywogs, the maximum length of jump, the number of stones and the number of special stones.

The next line contains k integers, c1, c2, ... ck, separated by spaces (1 ≤ ci ≤ 109) — the energetic costs of jumps.

The next q lines contain description of the special stones. Each line contains two integers p and wp (x + 1 ≤ p ≤ n, |wp| ≤ 109). All p are distinct.

Output

Print the minimum amount of energy they need, in the first and only line of output.

Examples

Input

2 3 10 2
1 2 3
5 -10
6 1000


Output

6


Input

4 7 85 3
17 5 28 4 52 46 6
59 -76
33 -69
19 2018


Output

135

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
namespace io {
const int N = 1 << 20;
char buf[N], *t1 = buf, *t2 = buf;
inline int read() {
  static int an, f;
  an = 0, f = 1;
  static char ch;
  ch = t1 == t2 && (t2 = (t1 = buf) + fread(buf, 1, N, stdin), t1 == t2)
           ? EOF
           : *t1++;
  while (ch < 48 || ch > 57)
    ch == '-' ? f = -1 : 0,
                ch = t1 == t2 && (t2 = (t1 = buf) + fread(buf, 1, N, stdin),
                                  t1 == t2)
                         ? EOF
                         : *t1++;
  while (ch >= 48 && ch <= 57)
    an = (an << 3) + (an << 1) + (ch ^ 48),
    ch = t1 == t2 && (t2 = (t1 = buf) + fread(buf, 1, N, stdin), t1 == t2)
             ? EOF
             : *t1++;
  return an * f;
}
char buff[N], *T = buff;
void flush() {
  fwrite(buff, 1, T - buff, stdout);
  T = buff;
}
inline void putc(char ch) {
  if (T == buff + N) flush();
  *T++ = ch;
}
template <typename o>
inline void print(o x) {
  if (x < 0) putc('-'), x = -x;
  if (!x) return putc('0'), void();
  static int st[20], tp;
  while (x) st[++tp] = x % 10, x /= 10;
  while (tp) putc(st[tp] ^ 48), --tp;
}
}  // namespace io
using io::flush;
using io::print;
using io::putc;
using io::read;
struct stone {
  int p, w;
  friend bool operator<(stone a, stone b) { return a.p < b.p; }
} a[30];
int n, m, l, k, lim, c[10];
inline void upmin(long long &x, long long y) { x > y ? x = y : 0; }
const long long inf = 0x3f3f3f3f3f3f3f3fll;
struct matrix {
  long long a[128][128];
  friend matrix operator*(matrix a, matrix b) {
    static matrix c;
    for (int i = 0; i < lim; ++i)
      for (int j = 0; j < lim; ++j) {
        c.a[i][j] = inf;
        for (int k = 0; k < lim; ++k) upmin(c.a[i][j], a.a[i][k] + b.a[k][j]);
      }
    return c;
  }
} t[30];
struct data {
  long long a[128];
  friend data operator*(data a, matrix b) {
    static data c;
    for (int i = 0; i < lim; ++i) {
      c.a[i] = inf;
      for (int j = 0; j < lim; ++j) upmin(c.a[i], a.a[j] + b.a[j][i]);
    }
    return c;
  }
} s;
void trans(int d) {
  for (int i = 0; i <= 26; ++i)
    if (d >> i & 1) s = s * t[i];
}
int main() {
  n = read(), m = read(), l = read(), k = read();
  for (int i = 1; i <= m; ++i) c[i] = read();
  for (int i = 1; i <= k; ++i) a[i].p = read(), a[i].w = read();
  sort(a + 1, a + 1 + k);
  lim = 1 << (m - 1);
  for (int i = 0; i < lim; ++i)
    for (int j = 0; j < lim; ++j) t[0].a[i][j] = inf;
  for (int i = 0; i < lim; ++i) {
    if (__builtin_popcount(i) == n)
      t[0].a[i][i >> 1] = 0;
    else if (__builtin_popcount(i) == n - 1) {
      for (int j = 1; j <= m; ++j) {
        int x = i ^ (1 << (j - 1));
        if (__builtin_popcount(x) == n) t[0].a[i][x >> 1] = c[j];
      }
    }
  }
  for (int i = 1; i <= 26; ++i) t[i] = t[i - 1] * t[i - 1];
  for (int i = 0; i < lim; ++i) s.a[i] = inf;
  s.a[(1 << (n - 1)) - 1] = 0;
  int last = 1;
  for (int i = 1; i <= k && a[i].p <= l - n; ++i) {
    trans(a[i].p - last);
    last = a[i].p;
    for (int j = 0; j < lim; ++j)
      if (__builtin_popcount(j) == n - 1) s.a[j] += a[i].w;
  }
  trans(l - n + 1 - last);
  long long ans = s.a[(1 << (n - 1)) - 1];
  for (int i = 1; i <= k; ++i)
    if (a[i].p > l - n) ans += a[i].w;
  printf("%lld", ans);
  flush();
  return 0;
}