#include <bits/stdc++.h>
using namespace std;
int n, m, s;
int cost[100010], ans[100010];
struct node {
  int cost, ability, id;
  bool operator<(const node &a) const { return cost > a.cost; }
} a[100010], b[100010];
bool cmp(node a, node b) { return a.ability > b.ability; }
bool check(int mid) {
  int t = s;
  priority_queue<node> que;
  for (int i = 1, j = 1; j <= m; j += mid) {
    while (i <= n && a[i].ability >= b[j].ability) {
      que.push(a[i]);
      i++;
    }
    if (que.empty()) return 0;
    t -= que.top().cost;
    if (t < 0) return 0;
    for (int k = j; k < min(j + mid, m + 1); k++) ans[b[k].id] = que.top().id;
    que.pop();
  }
  return 1;
}
int main() {
  cin >> n >> m >> s;
  for (int i = 1; i <= m; i++) cin >> b[i].ability, b[i].id = i;
  for (int i = 1; i <= n; i++) cin >> a[i].ability, a[i].id = i;
  for (int i = 1; i <= n; i++) cin >> a[i].cost;
  sort(b + 1, b + 1 + m, cmp);
  sort(a + 1, a + 1 + n, cmp);
  if (a[1].ability < b[1].ability) {
    cout << "NO" << endl;
    return 0;
  }
  int l = 1, r = m;
  while (l < r) {
    int mid = l + r >> 1;
    if (check(mid))
      r = mid;
    else
      l = mid + 1;
  }
  if (check(l)) {
    cout << "YES" << endl;
    for (int i = 1; i <= m; i++) cout << ans[i] << ' ';
  } else
    cout << "NO";
  return 0;
}
