#include <bits/stdc++.h>
using namespace std;
struct node {
  long long v;
  int t, d;
} b[200050];
int n, m, Ned, ti[200050];
long long s, a[200050][3], Val[200050];
inline bool cmp(node a, node b) { return a.v < b.v; }
inline bool Check(int G) {
  int mx[3];
  mx[1] = mx[2] = 1;
  for (int i = 2; i <= G; ++i) {
    if (a[mx[1]][1] > a[i][1]) mx[1] = i;
    if (a[mx[2]][2] > a[i][2]) mx[2] = i;
  }
  for (int i = 1; i <= m; ++i)
    b[i] = (node){a[mx[ti[i]]][ti[i]] * Val[i], i, mx[ti[i]]};
  sort(b + 1, b + m + 1, cmp);
  long long tmp = 0;
  for (int i = 1; i <= Ned; ++i) tmp += b[i].v;
  return tmp <= s;
}
inline void ef(int l, int r) {
  int mid;
  while (l <= r) {
    mid = l + r >> 1;
    if (Check(mid))
      r = mid - 1;
    else
      l = mid + 1;
  }
  if (l > n)
    printf("-1\n");
  else {
    printf("%d\n", l);
    Check(l);
    for (int i = 1; i <= Ned; ++i) printf("%d %d\n", b[i].t, b[i].d);
  }
}
int main() {
  scanf("%d%d%d%I64d", &n, &m, &Ned, &s);
  for (int i = 1; i <= n; ++i) scanf("%I64d", &a[i][1]);
  for (int i = 1; i <= n; ++i) scanf("%I64d", &a[i][2]);
  for (int i = 1; i <= m; ++i) scanf("%d%d", &ti[i], &Val[i]);
  ef(1, n + 1);
}
