#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 100000 + 10;
long long n, m, s;
long long ans[MAX_N];
pair<long long, int> bug[MAX_N], a[MAX_N], b[MAX_N];
set<pair<long long, int> > S;
bool G(long long day) {
  if ((n * day) < m) {
    return 0;
  }
  S.clear();
  long long d = 0;
  int j = n;
  long long cost = 0;
  pair<long long, int> per;
  for (int i = m; i > 0; i--) {
    for (; j > 0; j--) {
      if (a[j].first >= bug[i].first) {
        S.insert(b[a[j].second]);
      } else {
        break;
      }
    }
    if (d == day || d == 0) {
      if (S.size() == 0) {
        return 0;
      }
      pair<long long, int> p = *S.begin();
      S.erase(p);
      per.first = p.first;
      per.second = p.second;
      cost += per.first;
      ans[bug[i].second] = per.second;
      d = 1;
    } else {
      ans[bug[i].second] = per.second;
      d++;
    }
  }
  if (cost > s) {
    return 0;
  }
  return 1;
}
void F(long long l, long long h) {
  if (l > h) {
    cout << "NO" << endl;
    exit(0);
  }
  long long mi = (l + h) / 2;
  if (G(mi) == 1) {
    if (l == h) {
      cout << "YES" << endl;
      for (int i = 1; i <= m; i++) {
        cout << ans[i] << " ";
      }
      exit(0);
    }
    h = mi;
    F(l, h);
  } else {
    if (l == h) {
      cout << "NO" << endl;
      exit(0);
    }
    l = mi + 1;
    F(l, h);
  }
}
int main() {
  cin >> n >> m >> s;
  for (int i = 1; i <= m; i++) {
    cin >> bug[i].first;
    bug[i].second = i;
  }
  for (int i = 1; i <= n; i++) {
    cin >> a[i].first;
    a[i].second = i;
  }
  for (int i = 1; i <= n; i++) {
    cin >> b[i].first;
    b[i].second = i;
  }
  sort(bug + 1, bug + m + 1);
  sort(a + 1, a + n + 1);
  F(1, 100000);
}
