#include <bits/stdc++.h>
using namespace std;
int f[110000], c[110000], n, m, s;
struct nodd {
  int x, y, z;
  void init(int xx, int yy) {
    x = xx;
    y = yy;
  }
} b[110000], a[110000], d;
bool cmp(nodd a, nodd b) { return a.x < b.x; }
struct cmp2 {
  bool operator()(nodd &a, nodd &b) { return a.y > b.y; }
};
void init() {
  cin >> m >> n >> s;
  for (int i = (1); i <= (n); ++i) scanf("%d", &a[i].x);
  for (int i = (1); i <= (n); ++i) a[i].y = i;
  sort(a + 1, a + n + 1, cmp);
  for (int i = (1); i <= (m); ++i) scanf("%d", &b[i].x);
  for (int i = (1); i <= (m); ++i) scanf("%d", &b[i].y);
  for (int i = (1); i <= (m); ++i) b[i].z = i;
  sort(b + 1, b + m + 1, cmp);
}
bool ok(int k) {
  priority_queue<nodd, vector<nodd>, cmp2> q;
  int sum = 0, pp = m;
  for (int i = (1); i <= (m); ++i) c[i] = k;
  for (int i = (n); i >= (1); --i) {
    while (pp && b[pp].x >= a[i].x) {
      d.init(b[pp].z, b[pp].y);
      q.push(d);
      pp--;
    }
    if (q.empty()) return 0;
    d = q.top();
    sum += d.y;
    f[a[i].y] = d.x;
    q.pop();
    if (sum > s) return 0;
    if (--c[d.x]) {
      d.y = 0;
      q.push(d);
    }
  }
  return 1;
}
void work() {
  int l = 1, r = n, k;
  while (l < r) {
    k = (l + r) / 2;
    if (ok(k))
      r = k;
    else
      l = k + 1;
  }
  if (!ok(l))
    printf("NO");
  else {
    printf("YES\n");
    for (int i = (1); i <= (n); ++i) {
      printf("%d", f[i]);
      if (i < n) printf(" ");
    }
  }
}
int main() {
  init();
  work();
  return 0;
}
