#include <bits/stdc++.h>
using namespace std;
const int maxn = 100005;
struct task {
  int a, id;
  friend inline bool operator<(const task &x, const task &y) {
    return x.a < y.a;
  }
};
struct student {
  int b, id, c;
  friend inline bool operator<(const student &x, const student &y) {
    return x.b < y.b;
  }
};
int n, m, s;
task ta[maxn];
student stu[maxn];
int ans[maxn];
inline bool check(int lim) {
  priority_queue<pair<int, int> > q;
  int j = n;
  long long rest = s;
  for (int i = m; i >= 1; i -= lim) {
    while (j >= 1 && stu[j].b >= ta[i].a) {
      q.push(pair<int, int>(-stu[j].c, stu[j].id));
      j--;
    }
    if (q.empty()) return false;
    pair<int, int> v = q.top();
    q.pop();
    rest += v.first;
    if (rest < 0) return false;
    for (int k = i; k >= 1 && k > i - lim; k--) {
      ans[ta[k].id] = v.second;
    }
  }
  return true;
}
int main() {
  int i, j;
  scanf("%d%d%d", &n, &m, &s);
  for (i = 1; i <= m; i++) {
    scanf("%d", &ta[i].a);
    ta[i].id = i;
  }
  for (i = 1; i <= n; i++) {
    scanf("%d", &stu[i].b);
    stu[i].id = i;
  }
  for (i = 1; i <= n; i++) {
    scanf("%d", &stu[i].c);
  }
  sort(ta + 1, ta + 1 + m);
  sort(stu + 1, stu + 1 + n);
  int le = 0, ri = m + 1;
  while (le != ri) {
    int mid = (le + ri) >> 1;
    if (!check(mid))
      le = mid + 1;
    else
      ri = mid;
  }
  if (le == m + 1)
    printf("NO\n");
  else {
    printf("YES\n");
    check(le);
    for (i = 1; i <= m; i++) {
      printf("%d ", ans[i]);
    }
    printf("\n");
  }
  return 0;
}
