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 std::cin;
using std::cout;
using std::endl;
using std::map;
using std::max;
using std::min;
using std::pair;
using std::priority_queue;
using std::queue;
using std::set;
using std::sort;
using std::vector;
bool chmin(long long &a, const long long &b) {
  return a > b ? a = b, true : false;
}
bool chmax(long long &a, const long long &b) {
  return a < b ? a = b, true : false;
}
const int maxN = 100000000;
const int maxX = 8, maxK = 8;
const int maxQ = 25;
const long long INF = 0x3f3f3f3f3f3f3f3fLL;
int x, k, n, q;
int c[maxK + 1];
map<int, int> Q;
const int maxS = 70 + 5;
long long G[maxS][maxS];
int H[maxS][maxS];
int M[1 << maxK], T[1 << maxK];
set<int> S;
int tot = 0;
struct Matrix {
  int n;
  long long __val__[maxS][maxS];
  long long *operator[](const int &i) { return __val__[i]; }
  Matrix(int n = 0) {
    this->n = n;
    memset(__val__, 0x3f, sizeof(__val__));
  }
  friend Matrix operator*(Matrix A, Matrix B) {
    int n = A.n;
    Matrix R(n);
    for (int i = 0; i < n; ++i)
      for (int k = 0; k < n; ++k)
        for (int j = 0; j < n; ++j) chmin(R[i][j], A[i][k] + B[k][j]);
    return R;
  }
} P[30];
struct Vector {
  int n;
  long long __val__[maxS];
  long long &operator[](const int &i) { return __val__[i]; }
  Vector(int n = 0) {
    this->n = n;
    memset(__val__, 0x3f, sizeof(__val__));
  }
  friend Vector operator^(Vector A, int b) {
    int n = A.n;
    for (int t = 0; (1 << t) <= b; ++t)
      if (b & (1 << t)) {
        Vector B(n);
        for (int i = 0; i < n; ++i) {
          for (int k = 0; k < n; ++k) {
            chmin(B[i], P[t][i][k] + A[k]);
          }
        }
        A = B;
      }
    return A;
  }
};
void initialize() {
  cin >> x >> k >> n >> q;
  for (int i = 1; i <= k; ++i) cin >> c[i];
  Q.clear();
  for (int i = 0; i < q; ++i) {
    int p, wp;
    cin >> p >> wp;
    Q[p] = wp;
  }
  if (!Q.count(n - x)) Q[n - x] = 0;
  memset(G, 0x3f, sizeof(G));
  memset(M, 0, sizeof(M));
  memset(T, 0, sizeof(T));
  S.clear();
  queue<int> Q;
  while (!Q.empty()) Q.pop();
  T[M[(1 << x) - 1] = tot++] = (1 << x) - 1;
  S.insert((1 << x) - 1);
  Q.push((1 << x) - 1);
  while (!Q.empty()) {
    int u = Q.front();
    Q.pop();
    for (int i = 1; i <= k; ++i) {
      long long t = 0;
      int v;
      if (u & 1) {
        if (u & (1 << i)) continue;
        v = (u >> 1) | (1 << (i - 1));
        t = c[i];
      } else if (i == 1) {
        v = u >> 1;
      } else {
        break;
      }
      if (!S.count(v)) {
        S.insert(v);
        T[M[v] = tot++] = v;
        Q.push(v);
      }
      G[M[u]][M[v]] = t;
      H[M[u]][M[v]] = (u & 1) ? i : 0;
    }
  }
  P[0] = Matrix(tot);
  for (int i = 0; i < tot; ++i)
    for (int j = 0; j < tot; ++j) P[0][j][i] = G[i][j];
  for (int i = 1; i < 30; ++i) P[i] = P[i - 1] * P[i - 1];
}
Vector f, g;
long long solve() {
  f = Vector(tot);
  g = Vector(tot);
  vector<int> qs;
  qs.clear();
  for (pair<int, int> p : Q) qs.push_back(p.first);
  std::reverse(qs.begin(), qs.end());
  int nowi = 1;
  f[M[(1 << x) - 1]] = 0;
  while (qs.size() && qs.back() < n - x + 1) {
    int p = qs.back();
    if (nowi < p - k) {
      g = f ^ (p - k - nowi);
      f = g;
      nowi = p - k;
    }
    for (int i = nowi; i < p; ++i) {
      g = Vector(tot);
      for (int j = 0; j < tot; ++j) {
        for (int k = 0; k < tot; ++k)
          if (G[j][k] < INF) {
            long long extra = 0;
            if (H[j][k] && Q.count(i + H[j][k])) extra = Q[i + H[j][k]];
            chmin(g[k], f[j] + G[j][k] + extra);
          }
      }
      f = g;
    }
    nowi = std::max(nowi, p);
    qs.pop_back();
  }
  for (int i = nowi; i < n - x + 1; ++i) {
    g = Vector(tot);
    for (int j = 0; j < tot; ++j) {
      for (int k = 0; k < tot; ++k)
        if (G[j][k] < INF) {
          long long extra = 0;
          if (H[j][k] && Q.count(i + H[j][k])) extra = Q[i + H[j][k]];
          chmin(g[k], f[j] + G[j][k] + extra);
        }
    }
    f = g;
  }
  return f[M[(1 << x) - 1]];
}
int main() {
  initialize();
  printf("%lld\n", solve());
  return 0;
}
