#include <bits/stdc++.h>
using namespace std;
void smain();
int main() {
  ios_base::sync_with_stdio(0);
  cout.precision(12);
  cout << fixed;
  smain();
  return 0;
}
long long n, m, s;
long long c[100001], ans[100001];
pair<long long, long long> a[100001], b[100001];
inline bool can(long long x) {
  long long i = m - 1, j = n - 1, v = 0;
  set<pair<long long, long long> > q;
  for (; i >= 0;) {
    for (; j >= 0 && b[j].first >= a[i].first; --j)
      q.insert(make_pair(c[b[j].second], b[j].second));
    if (q.size() == 0) return false;
    auto it = q.begin();
    v += it->first;
    for (long long k = 0; i >= 0 && k < x; ++k, --i)
      ans[a[i].second] = it->second;
    q.erase(it);
  }
  return v <= s;
}
void smain() {
  for (; cin >> n >> m >> s;) {
    for (long long i = 0; i < m; i++) cin >> a[i].first, a[i].second = i;
    for (long long i = 0; i < n; i++) cin >> b[i].first, b[i].second = i;
    for (long long i = 0; i < n; i++) cin >> c[i];
    sort(a, a + m);
    sort(b, b + n);
    long long l = 0, r = m + 1;
    while (l < r) {
      long long x = (l + r) / 2;
      if (can(x))
        r = x;
      else
        l = x + 1;
    }
    if (l == m + 1) {
      cout << "NO\n";
    } else {
      can(l);
      cout << "YES\n";
      for (long long i = 0; i < m; i++) cout << ans[i] + 1 << ' ';
      cout << endl;
    }
  }
}
