#include <bits/stdc++.h>
using namespace std;
int a[111111], ma[111111], n, m, s;
int result[111111];
struct st {
  int b, c, id;
} stu[111111];
struct Tree {
  int l, r, maxnum, minnum;
} tree[111111 << 2];
struct A {
  int a;
  int id;
} num[111111];
void build(int left, int right, int index) {
  tree[index].l = left, tree[index].r = right;
  if (left == right) {
    tree[index].maxnum = tree[index].minnum = stu[left].b;
    return;
  }
  int mid = left + right >> 1;
  build(left, mid, index << 1);
  build(mid + 1, right, index << 1 | 1);
  tree[index].maxnum =
      max(tree[index << 1].maxnum, tree[index << 1 | 1].maxnum);
  tree[index].minnum =
      min(tree[index << 1].minnum, tree[index << 1 | 1].minnum);
}
int query(int index, int val) {
  if (tree[index].l == tree[index].r) {
    if (tree[index].maxnum < val) return -1;
    tree[index].maxnum = tree[index].minnum = -1000000007;
    return tree[index].l;
  }
  int mid = tree[index].l + tree[index].r >> 1, temp;
  if (val <= tree[index << 1].maxnum)
    temp = query(index << 1, val);
  else if (val <= tree[index << 1 | 1].maxnum)
    temp = query(index << 1 | 1, val);
  else
    temp = -1;
  tree[index].maxnum =
      max(tree[index << 1].maxnum, tree[index << 1 | 1].maxnum);
  tree[index].minnum =
      min(tree[index << 1].minnum, tree[index << 1 | 1].minnum);
  return temp;
}
int cam(const void *x, const void *y) {
  st p = *(st *)x;
  st q = *(st *)y;
  if (p.c == q.c) return q.b - p.b;
  return p.c - q.c;
}
int cam1(const void *x, const void *y) {
  A p = *(A *)x;
  A q = *(A *)y;
  return p.a - q.a;
}
int check(int day) {
  int i, j, index = 0, sum = s;
  int vis[111111];
  memset(vis, 0, sizeof(vis));
  num[m].id = m;
  ma[m] = n, vis[n] = day;
  build(0, n - 1, 1);
  for (i = m - 1; i >= 0; i--) {
    if (vis[ma[num[i + 1].id]] < day) {
      ma[num[i].id] = ma[num[i + 1].id];
      vis[ma[num[i].id]]++;
    } else {
      int res = query(1, num[i].a);
      if (res == -1) break;
      if (sum - stu[res].c < 0) break;
      sum -= stu[res].c;
      ma[num[i].id] = stu[res].id;
      vis[ma[num[i].id]]++;
    }
  }
  if (i == -1) {
    for (j = 0; j < m; j++) result[j] = ma[j];
  }
  if (i < 0)
    return 1;
  else
    return 0;
}
int solve() {
  int l = 1, r = 1000000007;
  while (l < r) {
    int mid = l + r >> 1;
    if (check(mid))
      r = mid;
    else
      l = mid + 1;
  }
  return r;
}
int main() {
  int i, j;
  scanf("%d %d %d", &n, &m, &s);
  for (i = 0; i < m; i++) scanf("%d", &num[i].a), num[i].id = i;
  for (i = 0; i < n; i++) scanf("%d", &stu[i].b);
  for (i = 0; i < n; i++) scanf("%d", &stu[i].c);
  for (i = 0; i < n; i++) stu[i].id = i;
  qsort(num, m, sizeof(num[0]), cam1);
  qsort(stu, n, sizeof(stu[0]), cam);
  int r = solve();
  if (r == 1000000007)
    printf("NO\n");
  else {
    printf("YES\n");
    for (i = 0; i < m; i++) {
      printf("%d ", result[i] + 1);
    }
    printf("\n");
  }
  return 0;
}
