#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
const int INF = 2e9 + 7;
const long long INFL = 8e18L + 7;
const double INFD = 1e300;
void run();
int main() {
  if (strlen("") > 0) {
    freopen(
        ""
        ".in",
        "r", stdin);
    freopen(
        ""
        ".out",
        "w", stdout);
  }
  run();
  return 0;
}
const int N = 1e6 + 7;
int n, m, k, s;
int a[N], b[N], t[N];
void run() {
  cin >> n >> m >> k >> s;
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < n; i++) cin >> b[i];
  vector<pair<long long, int> > c1, c2;
  for (int i = 0; i < m; i++) {
    int ci;
    cin >> t[i] >> ci;
    (t[i] == 1 ? c1 : c2).push_back({ci, i});
  }
  sort(c1.begin(), c1.end());
  sort(c2.begin(), c2.end());
  int l = 1, r = n;
  vector<pair<long long, int> > ans;
  int ansday = -1;
  while (l <= r) {
    int m = (l + r) / 2;
    int ca = *min_element(a, a + m);
    int cb = *min_element(b, b + m);
    vector<pair<long long, int> > cc1 = c1;
    vector<pair<long long, int> > cc2 = c2;
    for (pair<long long, int> &x : cc1) x.first *= ca;
    for (pair<long long, int> &x : cc2) x.first *= cb;
    vector<pair<long long, int> > c(cc1.size() + cc2.size());
    merge(cc1.begin(), cc1.end(), cc2.begin(), cc2.end(), c.begin());
    long long sum =
        accumulate(c.begin(), c.begin() + k, 0LL,
                   [](const long long &sum, pair<long long, int> &add) {
                     return sum + add.first;
                   });
    if (sum <= s) {
      r = m - 1;
      if (ansday == -1 || m < ansday) {
        ansday = m;
        ans = vector<pair<long long, int> >(c.begin(), c.begin() + k);
      }
    } else
      l = m + 1;
  }
  cout << ansday << endl;
  if (ansday != -1) {
    int ca = min_element(a, a + ansday) - a;
    int cb = min_element(b, b + ansday) - b;
    for (pair<long long, int> &p : ans)
      printf("%d %d\n", p.second + 1, (t[p.second] == 1 ? ca : cb) + 1);
  }
}
