#include <bits/stdc++.h>
using namespace std;
long long spf[9];
long long fac[9];
void sieve() {
  spf[1] = 1;
  for (long long i = 2; i < 9; i++) spf[i] = i;
  for (long long i = 4; i < 9; i += 2) spf[i] = 2;
  for (long long i = 3; i * i < 9; i++) {
    if (spf[i] == i) {
      for (long long j = i * i; j < 9; j += i)
        if (spf[j] == j) spf[j] = i;
    }
  }
}
map<long long, long long> getfactor(long long a) {
  map<long long, long long> m;
  while (a > 1) {
    m[spf[a]]++;
    a /= spf[a];
  }
  return m;
}
long long power(long long x, long long y, long long p) {
  long long res = 1;
  x = x % p;
  if (x == 0) return 0;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
long long gcd(long long a, long long b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
long long inverse(long long a, long long p) { return power(a, p - 2, p); }
long long ncr(long long n, long long r, long long p) {
  if (r == 0) return 1;
  return (fac[n] * inverse(fac[r], p) % p * inverse(fac[n - r], p) % p) % p;
}
long long n, m, ss;
pair<long long, pair<long long, long long> > p[100005];
pair<long long, long long> a[100005];
long long ans2[100005] = {0};
bool check(long long mid) {
  long long t = 0, sum = 0;
  long long ans[m + 1];
  multiset<pair<long long, long long> > s;
  long long j = 1;
  for (long long i = 1; i <= m; i++) {
    while (p[j].first >= a[i].first && j <= n) {
      s.insert(p[j].second);
      j++;
    }
    if (s.size() == 0) return false;
    auto it = s.begin();
    sum += it->first;
    if (sum > ss) return false;
    for (long long k = 0; k < mid && i + k <= m; k++)
      ans[a[i + k].second] = it->second;
    i = i + mid - 1;
    s.erase(it);
  }
  if (sum > ss)
    return false;
  else {
    for (long long jj = 1; jj <= m; jj++) ans2[jj] = ans[jj];
    return true;
  }
}
void solve() {
  cin >> n >> m >> ss;
  for (long long i = 1; i <= m; i++) {
    cin >> a[i].first;
    a[i].second = i;
  }
  for (long long i = 1; i <= n; i++) {
    cin >> p[i].first;
    p[i].second.second = i;
  }
  for (long long i = 1; i <= n; i++) cin >> p[i].second.first;
  sort(p + 1, p + n + 1);
  reverse(p + 1, p + n + 1);
  sort(a + 1, a + m + 1);
  reverse(a + 1, a + m + 1);
  bool flag = 0;
  long long l = 1, r = 1e5 + 1;
  while (l <= r) {
    long long mid = (l + r) / 2;
    if (check(mid)) {
      r = mid - 1;
      flag = 1;
    } else
      l = mid + 1;
  }
  if (flag) {
    cout << "YES" << '\n';
    for (long long i = 1; i <= m; i++) cout << ans2[i] << " ";
  } else
    cout << "NO" << '\n';
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long t = 1;
  while (t--) {
    solve();
  }
}
