#include <bits/stdc++.h>
using namespace std;
map<pair<int, int>, int> d;
vector<pair<int, int> > b;
vector<pair<int, int> > ab;
int cs[100005], n, m, s;
int as[100005];
int cnt[100005];
int fin[100005];
long long assign(int k) {
  int j = n - 1;
  priority_queue<pair<int, int> > p;
  long long cost = 0;
  for (int i = m - 1; i >= 0; i--) {
    while (j >= 0 && ab[j].first >= b[i].first) {
      p.push(make_pair(-1 * cs[ab[j].second], ab[j].second));
      j--;
    }
    if (p.empty()) return -1;
    pair<int, int> x = p.top();
    long long cst = -(x.first), id = x.second;
    cnt[id]++;
    p.pop();
    if (cnt[id] < k) p.push(make_pair(0, id));
    as[b[i].second] = id;
    cost += (long long)cst;
  }
  return cost;
}
int solve() {
  int mi = 1, mx = 100007;
  while (mi < mx) {
    int mid = (mi + mx) / 2;
    long long cost = assign(mid);
    if (cost != -1 && cost <= s) {
      mx = mid;
      for (int i = 1; i <= m; i++) fin[i] = as[i];
    } else
      mi = mid + 1;
    memset(cnt, 0, sizeof(int) * 100004);
  }
  return mx;
}
int main() {
  ios::sync_with_stdio(false);
  cin >> n >> m >> s;
  for (int i = 1; i <= m; i++) {
    int x;
    cin >> x;
    b.push_back(make_pair(x, i));
  }
  for (int i = 1; i <= n; i++) {
    int x;
    cin >> x;
    ab.push_back(make_pair(x, i));
  }
  for (int(i) = 0; (i) < (int)(n); (i)++) cin >> cs[i + 1];
  sort(ab.begin(), ab.end());
  sort(b.begin(), b.end());
  int res = solve();
  if (res >= 100001) {
    cout << "NO" << endl;
  } else {
    cout << "YES" << endl;
    for (int i = 1; i <= m; i++) cout << fin[i] << " ";
    cout << endl;
  }
  return 0;
}
