#include <bits/stdc++.h>
using namespace std;
vector<pair<long long, long long>> bugs;
vector<pair<long long, pair<long long, long long>>> students;
int n, m;
long long maxPasses;
int resArr[200000];
long long getPasses(int days) {
  int si = students.size() - 1;
  set<pair<long long, long long>> prices;
  long long res = 0;
  int i = bugs.size() - 1;
  while (i >= 0) {
    while ((si != -1) && students[si].first >= bugs[i].first) {
      prices.insert(students[si].second);
      si--;
    }
    if (prices.empty()) return maxPasses + 1;
    res += prices.begin()->first;
    int ci = prices.begin()->second;
    prices.erase(prices.begin());
    for (int x = 0; x < days; x++) {
      if (i - x < 0) break;
      resArr[bugs[i - x].second] = ci + 1;
    }
    i -= days;
  }
  return res;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n >> m >> maxPasses;
  for (int i = 0; i < m; i++) {
    long long c;
    cin >> c;
    bugs.push_back({c, i});
  }
  sort(bugs.begin(), bugs.end());
  long long x[n], y[n];
  for (int i = 0; i < n; i++) cin >> x[i];
  for (int i = 0; i < n; i++) cin >> y[i];
  for (int i = 0; i < n; i++) {
    students.push_back({x[i], {y[i], i}});
  }
  sort(students.begin(), students.end());
  if (getPasses(n * 2) > maxPasses) {
    cout << "NO" << endl;
    return 0;
  }
  int from = 1, to = n * 2 - 1;
  int best = to;
  while (from <= to) {
    int avg = (from + to) / 2;
    if (getPasses(avg) <= maxPasses) {
      best = avg;
      to = avg - 1;
    } else {
      from = avg + 1;
    }
  }
  getPasses(best);
  cout << "YES" << endl;
  for (int i = 0; i < m; i++) cout << resArr[i] << " ";
  cout << endl;
  return 0;
}
