#include <bits/stdc++.h>
using namespace std;
int n, k, m, s;
pair<int, int> a[200002][2];
vector<pair<int, int> > phone[2];
bool cek(int x) {
  vector<long long> tmp;
  for (int j = 0; j < 2; j++)
    for (int i = 0; i < phone[j].size(); i++) {
      tmp.push_back((long long)a[x][j].first * phone[j][i].first);
    }
  sort(tmp.begin(), tmp.end());
  long long sum = 0;
  for (int i = 0; i < k; i++) sum += tmp[i];
  return sum <= s;
}
int main() {
  scanf("%d %d %d %d", &n, &m, &k, &s);
  for (int j = 0; j < 2; j++)
    for (int i = 0; i < n; i++) {
      scanf("%d", &a[i][j].first);
      a[i][j].second = i;
      if (a[i][j].first < a[i - 1][j].first || i == 0) continue;
      a[i][j] = a[i - 1][j];
    }
  int t, c;
  for (int i = 0; i < m; i++) {
    scanf("%d %d", &t, &c);
    phone[--t].push_back(make_pair(c, i));
  }
  for (int i = 0; i < 2; i++) {
    sort(phone[i].begin(), phone[i].end());
    if (phone[i].size() > k) phone[i].resize(k);
  }
  int l = 0;
  int r = n - 1;
  int ans = -2;
  while (l <= r) {
    int k = l + r >> 1;
    if (cek(k)) {
      ans = k;
      r = k - 1;
    } else
      l = k + 1;
  }
  printf("%d\n", ans + 1);
  if (ans == -2) return 0;
  vector<pair<long long, pair<int, int> > > tmp;
  int x = ans;
  for (int j = 0; j < 2; j++)
    for (int i = 0; i < phone[j].size(); i++) {
      tmp.push_back(make_pair((long long)a[x][j].first * phone[j][i].first,
                              make_pair(a[x][j].second, phone[j][i].second)));
    }
  sort(tmp.begin(), tmp.end());
  for (int i = 0; i < k; i++) {
    printf("%d %d\n", tmp[i].second.second + 1, tmp[i].second.first + 1);
  }
  return 0;
}
