#include <bits/stdc++.h>
using namespace std;
int n, m, s;
int bug[100010], skill[100010], cost[100010];
int v[100010], stu[100010], ans[100010];
bool cmp(int a, int b) { return bug[a] > bug[b]; }
bool cmp2(int a, int b) { return skill[a] > skill[b]; }
bool mycmp(int a, int b) {
  if (cost[a] != cost[b]) return cost[a] < cost[b];
  return a < b;
}
set<int, bool (*)(int, int)> myset(mycmp);
set<int, bool (*)(int, int)>::iterator it;
bool can(int x) {
  int a, b, total;
  a = b = total = 0;
  myset.clear();
  while (1) {
    if (b == m) break;
    assert(b < m);
    while (a < n && b < m && skill[stu[a]] >= bug[v[b]]) {
      myset.insert(stu[a++]);
    }
    if (myset.size() == 0) return false;
    it = myset.begin();
    int k = *it;
    myset.erase(it);
    total += cost[k];
    assert(total >= 0);
    if (total > s) return false;
    for (int i = 0; i < x && b < m; i++, b++) ans[v[b]] = k;
  }
  return true;
}
int main() {
  scanf("%d%d%d", &n, &m, &s);
  for (int i = 0; i < m; i++) scanf("%d", &bug[i]), v[i] = i;
  for (int i = 0; i < n; i++) scanf("%d", &skill[i]), stu[i] = i;
  for (int i = 0; i < n; i++) scanf("%d", &cost[i]);
  sort(v, v + m, cmp);
  sort(stu, stu + n, cmp2);
  int lo, hi, mid, x = -1;
  lo = 1;
  hi = m;
  while (lo <= hi) {
    mid = (lo + hi) / 2;
    if (can(mid)) {
      x = mid;
      hi = mid - 1;
    } else
      lo = mid + 1;
  }
  if (x == -1)
    printf("NO\n");
  else {
    can(x);
    printf("YES\n");
    for (int i = 0; i < m; i++) {
      if (i) printf(" ");
      printf("%d", ans[i] + 1);
    }
    printf("\n");
  }
  return 0;
}
