#include <bits/stdc++.h>
using namespace std;
bool can(vector<array<long long, 3>> M, vector<long long>& A,
         vector<long long>& B, int d, long long cash, int k) {
  long long mnA = *min_element(A.begin(), A.begin() + d);
  long long mnB = *min_element(B.begin(), B.begin() + d);
  int idxA = 0, idxB = 0;
  for (int i = 0; i < d; i++)
    if (A[i] == mnA) idxA = i + 1;
  for (int i = 0; i < d; i++)
    if (B[i] == mnB) idxB = i + 1;
  for (int i = 0; i < M.size(); i++)
    M[i][0] *= (M[i][1] == 1 ? mnA : mnB),
        M[i][1] = (M[i][1] == 1 ? idxA : idxB);
  sort(M.begin(), M.end());
  long long total = 0;
  for (int i = 0; i < k; i++) total += M[i][0];
  return total <= cash;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  long long n, m, k, s;
  cin >> n >> m >> k >> s;
  vector<long long> A(n), B(n);
  for (int i = 0; i < n; i++) cin >> A[i];
  for (int i = 0; i < n; i++) cin >> B[i];
  vector<array<long long, 3>> M(m);
  for (int i = 0; i < m; i++) cin >> M[i][1] >> M[i][0], M[i][2] = i + 1;
  int l = 1, r = n;
  while (l < r) {
    int mi = (l + r) / 2;
    if (can(M, A, B, mi, s, k))
      r = mi;
    else
      l = mi + 1;
  }
  long long mnA = *min_element(A.begin(), A.begin() + r);
  long long mnB = *min_element(B.begin(), B.begin() + r);
  int idxA = 0, idxB = 0;
  for (int i = 0; i < r; i++)
    if (A[i] == mnA) idxA = i + 1;
  for (int i = 0; i < r; i++)
    if (B[i] == mnB) idxB = i + 1;
  for (int i = 0; i < M.size(); i++)
    M[i][0] *= (M[i][1] == 1 ? mnA : mnB),
        M[i][1] = (M[i][1] == 1 ? idxA : idxB);
  sort(M.begin(), M.end());
  long long total = 0;
  for (int i = 0; i < k; i++) total += M[i][0];
  bool b = total <= s;
  if (!b) return cout << -1, 0;
  cout << r << "\n";
  for (int i = 0; i < k; i++) cout << M[i][2] << " " << M[i][1] << "\n";
}
