#include <bits/stdc++.h>
using namespace std;
struct mang {
  int cost, id;
  mang() {}
  mang(int _cost, int _id) : cost(_cost), id(_id) {}
  bool operator<(const mang &t) const { return cost > t.cost; }
};
priority_queue<mang> pq;
pair<int, int> p[100005];
pair<pair<int, int>, int> st[100005];
int a[100005], ans[100005];
int n, nbug, nsub;
bool ktra(int nday, int out) {
  long long sum = 0;
  int i, j, cur = n - 1;
  mang t;
  while (!pq.empty()) pq.pop();
  for (i = nbug - 1; i >= 0; i -= nday) {
    while (cur >= 0 && st[cur].first.first >= p[i].first) {
      pq.push(mang(st[cur].first.second, st[cur].second));
      cur--;
    }
    if (pq.empty()) return false;
    t = pq.top(), pq.pop();
    sum += t.cost;
    if (sum > nsub) return false;
    if (out == 1)
      for ((j) = (((i - nday + 1) > (0) ? (i - nday + 1) : (0))); (j) <= (i);
           (j)++)
        ans[p[j].second] = t.id;
  }
  return true;
}
void input() {
  int i, dau, giua, cuoi, res, x;
  scanf("%d %d %d", &n, &nbug, &nsub);
  for ((i) = 0; (i) < (nbug); (i)++) scanf("%d", &p[i].first), p[i].second = i;
  for ((i) = 0; (i) < (n); (i)++) scanf("%d", &a[i]);
  for ((i) = 0; (i) < (n); (i)++)
    scanf("%d", &x), st[i] = make_pair(make_pair(a[i], x), i + 1);
  sort(p, p + nbug);
  sort(st, st + n);
  dau = 1, cuoi = nbug + 1;
  res = -1;
  while (dau <= cuoi) {
    giua = (dau + cuoi) >> 1;
    if (ktra(giua, giua))
      res = giua, cuoi = giua - 1;
    else
      dau = giua + 1;
  }
  if (res != -1) {
    ktra(res, 1);
    printf("YES\n");
    for ((i) = 0; (i) < (nbug); (i)++) printf("%d ", ans[i]);
  } else
    printf("NO\n");
}
int main() {
  input();
  return 0;
}
