#include <bits/stdc++.h>
using namespace std;
struct bug {
  int a, vt;
};
struct hs {
  int a, c, vt;
  bool operator<(hs b) const { return c > b.c; }
};
const int nm = 100002;
int n, m, s;
bug a[nm];
hs b[nm];
int ans[nm];
int ans2[nm];
void nhap() {
  scanf("%d%d%d", &n, &m, &s);
  int i;
  for (i = 1; i <= m; ++i) {
    scanf("%d", &a[i].a);
    a[i].vt = i;
  }
  for (i = 1; i <= n; ++i) {
    scanf("%d", &b[i].a);
    b[i].vt = i;
  }
  for (i = 1; i <= n; ++i) scanf("%d", &b[i].c);
}
bool cmp(bug a, bug b) { return (a.a > b.a); }
bool cmp2(hs a, hs b) { return (a.a > b.a); }
bool kt(int t) {
  priority_queue<hs> heap;
  int i, j = 1, s2 = 0, i2;
  for (i = 1; i <= m; i += t) {
    for (; j <= n; ++j)
      if (b[j].a >= a[i].a)
        heap.push(b[j]);
      else
        break;
    if (heap.empty()) return 0;
    s2 += heap.top().c;
    if (s2 > s) return 0;
    for (i2 = i; i2 <= i + t - 1 && i2 <= m; ++i2)
      ans2[a[i2].vt] = heap.top().vt;
    heap.pop();
  }
  for (i = 1; i <= m; ++i) ans[i] = ans2[i];
  return 1;
}
void xuli() {
  sort(a + 1, a + m + 1, cmp);
  sort(b + 1, b + n + 1, cmp2);
  int l, r, mid, kq = -1, i;
  l = 1;
  r = m;
  while (l <= r) {
    mid = (l + r) / 2;
    if (kt(mid)) {
      kq = mid;
      r = mid - 1;
    } else
      l = mid + 1;
  }
  if (kq == -1) {
    printf("NO");
    return;
  }
  printf("YES\n");
  for (i = 1; i <= m; ++i) printf("%d ", ans[i]);
}
int main() {
  nhap();
  xuli();
}
