#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
template <class T>
using V = vector<T>;
const ll inf = (1e18);
const ll mod = 1000000007;
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
ll lcm(ll c, ll d) { return c / gcd(c, d) * d; }
__attribute__((constructor)) void init() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cout << fixed << setprecision(15);
}
template <class T>
bool chmax(T &a, const T &b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
bool chmin(T &a, const T &b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
int n, m, k, s;
V<P> cost[2], d, p;
V<ll> a, b, sum[2];
int C(int mid) {
  ll dt = d[mid].first, pt = p[mid].first;
  ll need = 0;
  for (int i = 0; i <= k; i++) {
    if (cost[0].size() < i || cost[1].size() < k - i) continue;
    need = sum[0][i] * dt + sum[1][k - i] * pt;
    if (need <= s) return i;
  }
  return -1;
}
int main() {
  cin >> n >> m >> k >> s;
  a.resize(n);
  b.resize(n);
  d.resize(n);
  p.resize(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    d[i] = P(a[i], i);
    if (i > 0) chmin(d[i], d[i - 1]);
  }
  for (int i = 0; i < n; i++) {
    cin >> b[i];
    p[i] = P(b[i], i);
    if (i > 0) chmin(p[i], p[i - 1]);
  }
  for (int i = 0; i < m; i++) {
    ll t, c;
    cin >> t >> c;
    cost[t - 1].emplace_back(c, i + 1);
  }
  sort((cost[0]).begin(), (cost[0]).end());
  sort((cost[1]).begin(), (cost[1]).end());
  for (int i = 0; i < 2; i++) {
    sum[i].emplace_back(0);
    for (int j = 0; j < cost[i].size(); j++) {
      sum[i].emplace_back(sum[i][j] + cost[i][j].first);
    }
  }
  int l = 0, r = n, mid, ind;
  for (int i = 0; i < 100; i++) {
    mid = (l + r) / 2;
    int c = C(mid);
    if (c != -1) {
      r = mid;
      ind = c;
    } else
      l = mid;
  }
  cout << (r == n ? -1 : r + 1) << "\n";
  if (r != n) {
    V<P> res;
    for (int i = 0; i < ind; i++) {
      res.emplace_back(d[r].second, cost[0][i].second);
    }
    for (int i = 0; i < k - ind; i++) {
      res.emplace_back(p[r].second, cost[1][i].second);
    }
    sort((res).begin(), (res).end());
    for (auto &p : res) cout << p.second << " " << p.first + 1 << "\n";
  }
}
