#include <bits/stdc++.h>
using namespace std;
const int DIM = 100006;
tuple<int, int, int> stu[DIM];
pair<int, int> bug[DIM];
int ans[DIM];
set<pair<int, int>> prq;
bool solve(int x, int n, int m, int s) {
  prq.clear();
  int sum = 0;
  for (int i = m, j = n; i >= 1; i -= x) {
    while (j > 0 && get<0>(stu[j]) >= bug[i].first) {
      prq.insert(make_pair(get<1>(stu[j]), get<2>(stu[j])));
      j--;
    }
    if (prq.empty()) return false;
    pair<int, int> pr = *prq.begin();
    prq.erase(prq.begin());
    sum += pr.first;
    if (sum > s) return false;
    for (int k = i; k > max(0, i - x); k--) ans[bug[k].second] = pr.second;
  }
  return true;
}
int main(void) {
  int n, m, s;
  cin >> n >> m >> s;
  for (int i = 1; i <= m; i++) {
    int x;
    cin >> x;
    bug[i] = make_pair(x, i);
  }
  for (int i = 1; i <= n; i++) {
    int x;
    cin >> x;
    get<0>(stu[i]) = x;
  }
  for (int i = 1; i <= n; i++) {
    int x;
    cin >> x;
    get<1>(stu[i]) = x;
    get<2>(stu[i]) = i;
  }
  sort(bug + 1, bug + m + 1);
  sort(stu + 1, stu + n + 1);
  int le = 1, ri = n, mi;
  while (le <= ri) {
    mi = le + (ri - le) / 2;
    if (solve(mi, n, m, s))
      ri = mi - 1;
    else
      le = mi + 1;
  }
  if (solve(le, n, m, s)) {
    cout << "YES\n";
    for (int i = 1; i <= m; i++) cout << ans[i] << " ";
  } else
    cout << "NO\n";
  return 0;
}
