#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100005;
int n, m;
int b[MAXN], c[MAXN];
pair<int, int> a[MAXN];
pair<int, int> v[MAXN];
int ans[MAXN];
bool F(int k, int s) {
  set<pair<int, int> > mset;
  int j = 0;
  for (int i = 0; i < m; i++) {
    while (j < n && v[j].first >= a[i].first) {
      mset.insert(pair<int, int>(c[v[j].second], v[j].second));
      j++;
    }
    if (mset.empty()) return false;
    int val = mset.begin()->second;
    s -= mset.begin()->first;
    mset.erase(mset.begin());
    if (s < 0) return false;
    int l = min(m, i + k);
    for (int k = i; k < l; k++) ans[a[k].second] = val + 1;
    i = l - 1;
  }
  return true;
}
int main() {
  ios_base::sync_with_stdio(false);
  int s;
  while (cin >> n >> m >> s) {
    for (int i = 0; i < m; i++) {
      int x;
      cin >> x;
      a[i] = pair<int, int>(x, i);
    }
    for (int i = 0; i < n; i++) {
      cin >> b[i];
      v[i] = pair<int, int>(b[i], i);
    }
    for (int i = 0; i < n; i++) {
      cin >> c[i];
    }
    sort(v, v + n);
    sort(a, a + m);
    reverse(v, v + n);
    reverse(a, a + m);
    int lo = 1, hi = m + 1;
    while (lo < hi) {
      int mid = (lo + hi) >> 1;
      if (F(mid, s)) {
        hi = mid;
      } else {
        lo = mid + 1;
      }
    }
    if (F(hi, s)) {
      cout << "YES" << endl;
      for (int i = 0; i < m; i++) cout << ans[i] << " ";
      cout << endl;
    } else {
      cout << "NO" << endl;
    }
  }
}
