#include <bits/stdc++.h>
using namespace std;
vector<pair<long long, long long> > v;
vector<pair<pair<long long, long long>, long long> > vv;
int main() {
  long long n, m, k;
  cin >> n >> m >> k;
  long long b[m], a[n], p[n];
  map<long long, long long> m2, res;
  for (long long i = 0; i < m; i++) {
    cin >> b[i];
    v.push_back(pair<long long, long long>(b[i], i));
  }
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (long long i = 0; i < n; i++) {
    cin >> p[i];
    vv.push_back(pair<pair<long long, long long>, long long>(
        pair<long long, long long>(a[i], p[i]), i));
  }
  bool poss = false;
  sort(v.rbegin(), v.rend());
  sort(vv.rbegin(), vv.rend());
  long long low = 1;
  long long high = m;
  long long fin = m + 1;
  while (low <= high) {
    long long mid = (low + high) / 2;
    map<long long, long long> mm, dd;
    priority_queue<pair<long long, long long>,
                   vector<pair<long long, long long> >,
                   greater<pair<long long, long long> > >
        pq;
    long long pos2 = 0;
    long long ans = 0;
    bool notdone = false;
    for (long long i = 0; i < m; i += mid) {
      notdone = true;
      while (vv[pos2].first.first >= v[i].first && pos2 < n) {
        pq.push(
            pair<long long, long long>(vv[pos2].first.second, vv[pos2].second));
        pos2++;
      }
      if (pq.size()) {
        pair<long long, long long> pp = pq.top();
        pq.pop();
        int days = mid;
        int ppos = i;
        ans += pp.first;
        while (days && ppos < m) {
          days--;
          ppos++;
          dd[v[ppos - 1].second] = pp.second + 1;
        }
        notdone = false;
      }
      if (notdone) break;
    }
    if (notdone || ans > k) {
      low = mid + 1;
    } else {
      high = mid - 1;
      fin = min(fin, mid);
      res = dd;
    }
  }
  if (fin == m + 1) {
    cout << "NO" << endl;
  } else {
    cout << "YES"
         << " " << endl;
    for (long long i = 0; i < m; i++) {
      cout << res[i] << " " << endl;
    }
  }
}
