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
#include <bits/stdc++.h>
using namespace std;
template <typename T>
bool get_int(T &x) {
  char t = getchar();
  bool neg = false;
  x = 0;
  for (; (t > '9' || t < '0') && t != '-' && t != EOF; t = getchar())
    ;
  if (t == '-') neg = true, t = getchar();
  if (t == EOF) return false;
  for (; t <= '9' && t >= '0'; t = getchar()) x = x * 10 + t - '0';
  if (neg) x = -x;
  return true;
}
template <typename T>
void print_int(T x) {
  if (x < 0) putchar('-'), x = -x;
  short a[20] = {}, sz = 0;
  while (x > 0) a[sz++] = x % 10, x /= 10;
  if (sz == 0) putchar('0');
  for (int i = sz - 1; i >= 0; i--) putchar('0' + a[i]);
}
const int inf = 0x3f3f3f3f;
const long long Linf = 1ll << 61;
const double pi = acos(-1.0);
struct matrix {
  long long a[70][70];
  void clear(int x = 0) {
    for (int i = 0; i < 70; i++)
      for (int j = 0; j < 70; j++) a[i][j] = Linf * ((i != j) || x == 0);
  }
  matrix(int x = 0) { clear(x); }
};
matrix operator*(const matrix &a, const matrix &b) {
  matrix c;
  for (int i = 0; i < 70; i++)
    for (int j = 0; j < 70; j++)
      for (int k = 0; k < 70; k++)
        c.a[i][j] = min(c.a[i][j], a.a[i][k] + b.a[k][j]);
  return c;
}
matrix tpw[30];
int id[1 << 8], tot, v[70], n, k, q, x, w[10];
matrix getpw(int x) {
  matrix ret(1);
  for (int i = 0; i < 30; i++)
    if ((((x) >> (i)) & 1)) ret = ret * tpw[i];
  return ret;
}
int main() {
  (get_int(x) && get_int(k));
  (get_int(n) && get_int(q));
  for (int i = 0; i < k; i++) get_int(w[i]);
  vector<pair<int, pair<int, int> > > vs;
  for (int i = 0, x, w; i < q; i++) {
    (get_int(x) && get_int(w));
    for (int j = 1; j <= k; j++)
      if (x - j > 0 && x - j <= n - ::x)
        vs.push_back(make_pair(x - j, make_pair(j - 1, w)));
  }
  memset(id, -1, sizeof(id));
  for (int i = 0; i < (1 << k); i++)
    if (__builtin_popcount(i) == x) {
      id[i] = tot;
      v[tot++] = i;
    }
  matrix &tran = tpw[0];
  for (int i = 0; i < tot; i++) {
    if ((((v[i]) >> (0)) & 1)) {
      for (int j = 0; j < k; j++)
        if ((((v[i] >> 1) >> (j)) & 1) == 0) {
          tran.a[i][id[(v[i] >> 1) | (1 << j)]] = w[j];
        }
    } else
      tran.a[i][id[v[i] >> 1]] = 0;
  }
  for (int i = 1; i < 30; i++) tpw[i] = tpw[i - 1] * tpw[i - 1];
  sort(vs.begin(), vs.end());
  int last = 0;
  matrix all(1);
  for (int i = 0, nxt = 0; i < (int)vs.size(); i = nxt) {
    matrix now = tran;
    for (; nxt < (int)vs.size() && vs[nxt].first == vs[i].first; nxt++) {
      for (int j = 0; j < tot; j++)
        if ((((v[j]) >> (0)) & 1) &&
            (((v[j] >> 1) >> (vs[nxt].second.first)) & 1) == 0)
          now.a[j][id[(v[j] >> 1) | (1 << vs[nxt].second.first)]] +=
              vs[nxt].second.second;
    }
    all = all * getpw(vs[i].first - last - 1);
    all = all * now;
    last = vs[i].first;
  }
  all = all * getpw(n - x - last);
  printf("%I64d\n", all.a[id[(1 << x) - 1]][id[(1 << x) - 1]]);
  return 0;
}
