#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2e5 + 1;
const int INF = 1e9 + 7;
long long a[MAXN + 1], b[MAXN + 1];
long long t[MAXN + 1], c[MAXN + 1];
long long cnt[MAXN + 1];
pair<long long, int> f[MAXN + 1];
int n, m, k;
long long s;
bool check(int time) {
  long long mina = INF, minb = INF;
  for (int i = 0; i < time; i++) mina = min(mina, a[i]), minb = min(minb, b[i]);
  for (int i = 0; i < m; i++) {
    if (t[i] == 1)
      cnt[i] = mina * c[i];
    else if (t[i] == 2)
      cnt[i] = minb * c[i];
  }
  sort(cnt, cnt + m);
  long long sumcost = 0;
  for (int i = 0; i < k; i++) sumcost += cnt[i];
  return sumcost <= s;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n >> m >> k >> s;
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int j = 0; j < n; j++) cin >> b[j];
  for (int i = 0; i < m; i++) cin >> t[i] >> c[i];
  int l = 0, r = n;
  while (r - l > 1) {
    int m = (l + r + 1) / 2;
    if (!check(m))
      l = m;
    else
      r = m;
  }
  if (!check(r)) {
    cout << -1 << endl;
    return 0;
  }
  long long mina = INF, minb = INF;
  int num1 = -1, num2 = -1;
  for (int i = 0; i < r; i++) {
    if (mina >= a[i]) mina = a[i], num1 = i;
    if (minb >= b[i]) minb = b[i], num2 = i;
  }
  for (int i = 0; i < m; i++) {
    if (t[i] == 1)
      cnt[i] = mina * c[i];
    else if (t[i] == 2)
      cnt[i] = minb * c[i];
    f[i] = make_pair(cnt[i], i);
  }
  sort(f, f + m);
  cout << r << endl;
  for (int i = 0; i < k; i++) {
    if (t[f[i].second] == 1)
      cout << f[i].second + 1 << " " << num1 + 1 << endl;
    else
      cout << f[i].second + 1 << " " << num2 + 1 << endl;
  }
  return 0;
}
