#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100005;
int n, m, s;
int A[MAXN];
struct node {
  int b, c, id;
  node() {}
  node(int x, int y) : id(x), c(y) {}
  bool operator<(const node& a) const { return c > a.c; }
} b[MAXN];
struct node2 {
  int v, id;
} a[MAXN];
priority_queue<node> q;
bool cmp(node a, node b) { return a.b < b.b; }
bool cmp2(node2 a, node2 b) { return a.v < b.v; }
int solve(int cnt, int flag) {
  int sz = n;
  long long ans = 0;
  while (!q.empty()) q.pop();
  for (int i = m; i >= 1; i -= cnt) {
    while (sz > 0 && a[i].v <= b[sz].b) {
      q.push(node(b[sz].id, b[sz].c));
      --sz;
    }
    if (q.empty()) return 0;
    node f = q.top();
    q.pop();
    ans += f.c;
    if (flag) {
      for (int j = i; j > max(i - cnt, 0); j--) {
        A[a[j].id] = f.id;
      }
    }
  }
  if (ans > s) return 0;
  return 1;
}
int main() {
  scanf("%d%d%d", &n, &m, &s);
  for (int i = 1; i <= m; i++) {
    scanf("%d", &a[i]);
    a[i].id = i;
  }
  sort(a + 1, a + m + 1, cmp2);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &b[i].b);
    b[i].id = i;
  }
  for (int i = 1; i <= n; i++) {
    scanf("%d", &b[i].c);
  }
  sort(b + 1, b + n + 1, cmp);
  int l = 1, r = m;
  int pos = -1;
  while (l <= r) {
    int m = l + r >> 1;
    if (solve(m, 0)) {
      pos = m;
      r = m - 1;
    } else
      l = m + 1;
  }
  if (pos == -1) {
    printf("NO\n");
    return 0;
  }
  solve(pos, 1);
  printf("YES\n");
  for (int i = 1; i <= m; i++) {
    printf("%d ", A[i]);
  }
  puts("");
  return 0;
}
