#include <bits/stdc++.h>
using namespace std;
long long INF = 1000000;
struct gad {
  long long c;
  int pos;
};
bool lower(gad const &first, gad const &sec) { return first.c < sec.c; }
int main() {
  long long n, m, k, s;
  cin >> n >> m >> k >> s;
  vector<long long> dpD(n), dpP(n), dpDday(n), dpPday(n);
  for (int i = 0; i < n; i++) {
    cin >> dpD[i];
    dpDday[i] = i + 1;
    if (i) {
      if (dpD[i] > dpD[i - 1]) {
        dpD[i] = dpD[i - 1];
        dpDday[i] = dpDday[i - 1];
      }
    } else {
      dpDday[i] = i + 1;
    }
  }
  for (int i = 0; i < n; i++) {
    cin >> dpP[i];
    dpPday[i] = i + 1;
    if (i) {
      if (dpP[i] > dpP[i - 1]) {
        dpP[i] = dpP[i - 1];
        dpPday[i] = dpPday[i - 1];
      }
    } else {
      dpPday[i] = i + 1;
    }
  }
  vector<gad> gad1, gad2;
  for (int i = 0; i < m; i++) {
    long long t, c;
    cin >> t >> c;
    gad tmp;
    tmp.c = c;
    tmp.pos = i;
    if (t == 1) {
      gad1.push_back(tmp);
    } else
      gad2.push_back(tmp);
  }
  sort(gad1.begin(), gad1.end(), &lower);
  sort(gad2.begin(), gad2.end(), &lower);
  int l = 0, r = n - 1;
  int best = INF;
  int pos1 = -1, pos2 = -1;
  vector<int> res(m);
  while (l <= r) {
    int mid = (l + r) / 2;
    int z = 0;
    long long g = 0;
    int i1 = 0;
    int i2 = 0;
    vector<int> cnt(m);
    long long rem = s;
    while (g < k) {
      long long t1 = rem + 1;
      if (i1 < gad1.size()) t1 = gad1[i1].c * dpD[mid];
      long long t2 = rem + 1;
      if (i2 < gad2.size()) t2 = gad2[i2].c * dpP[mid];
      if (t1 > rem && t2 > rem) break;
      if (t1 <= t2) {
        rem -= t1;
        cnt[gad1[i1].pos] = dpDday[mid];
        i1++;
      } else {
        rem -= t2;
        cnt[gad2[i2].pos] = dpPday[mid];
        i2++;
      }
      g++;
    }
    if (g == k) {
      best = min(best, mid);
      pos1 = i1;
      pos2 = i2;
      res = cnt;
      r = mid - 1;
    } else {
      l = mid + 1;
    }
  }
  if (best == INF) best = -2;
  cout << best + 1 << endl;
  for (int i = 0; i < m; i++) {
    if (res[i]) cout << i + 1 << " " << res[i] << endl;
  }
  return 0;
}
