#include <bits/stdc++.h>
using namespace std;
mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count());
pair<long long int, long long int> arr[300009], brr[300009], crr[300009];
long long int drr[300009], err[300009];
int main() {
  int test_case = 1;
  for (int cs = 1; cs <= test_case; cs++) {
    long long int n, m, k, second;
    scanf("%lld %lld %lld %lld", &n, &m, &k, &second);
    for (int i = 1; i <= n; i++) {
      long long int a;
      scanf("%lld", &a);
      if (i == 1 || a < arr[i - 1].first)
        arr[i] = {a, i};
      else
        arr[i] = arr[i - 1];
    }
    std::vector<pair<long long int, long long int> > v, v1;
    for (int i = 1; i <= n; i++) {
      long long int a;
      scanf("%lld", &a);
      if (i == 1 || a < brr[i - 1].first)
        brr[i] = {a, i};
      else
        brr[i] = brr[i - 1];
    }
    for (int i = 1; i <= m; i++) {
      scanf("%lld %lld", &crr[i].first, &crr[i].second);
      if (crr[i].first == 1)
        v.push_back({crr[i].second, i});
      else
        v1.push_back({crr[i].second, i});
    }
    sort(v.begin(), v.end());
    sort(v1.begin(), v1.end());
    for (int i = 0; i < v.size(); i++) drr[i + 1] = v[i].first + drr[i];
    for (int i = 0; i < v1.size(); i++) err[i + 1] = v1[i].first + err[i];
    long long int ans = n + 1, a = 0, b = 0;
    for (int i = 0; i <= v.size() && i <= k; i++) {
      long long int j = k - i;
      if (j > v1.size()) continue;
      long long int ans1 = n + 1;
      long long int lo = 1, hi = n;
      while (lo <= hi) {
        long long int mi = (lo + hi) / 2;
        long long int a1 = drr[i] * arr[mi].first;
        long long int b1 = err[j] * brr[mi].first;
        if ((a1 + b1) <= second)
          ans1 = mi, hi = mi - 1;
        else
          lo = mi + 1;
      }
      if (ans1 < ans) ans = ans1, a = i, b = j;
    }
    if (ans > n) {
      printf("-1\n");
      return 0;
    }
    printf("%lld\n", ans);
    for (int i = 0; i < a; i++)
      printf("%lld %lld\n", v[i].second, arr[ans].second);
    for (int i = 0; i < b; i++)
      printf("%lld %lld\n", v1[i].second, brr[ans].second);
  }
  return 0;
}
