#include <bits/stdc++.h>
using namespace std;
struct bug {
  int diff, index;
  bug(int d = 0, int i = 0) : diff(d), index(i) {}
  bool operator<(const bug &other) const { return diff > other.diff; }
};
struct stu {
  int lev, cla, index;
  stu(int l = 0, int c = 0, int i = 0) : lev(l), cla(c), index(i) {}
  bool operator<(const stu &other) const { return lev > other.lev; }
};
int n, m;
long long s;
bug bu[110000];
stu st[110000];
struct cmp {
  bool operator()(const stu &a, const stu &b) const { return a.cla > b.cla; }
};
int use[110000];
int bugfix[110000];
bool fix_day(int days) {
  memset(use, 0, sizeof(use));
  memset(bugfix, 0, sizeof(bugfix));
  priority_queue<stu, vector<stu>, cmp> q;
  int curb = 0, curs = 0;
  long long useclass = 0;
  while (curb < m) {
    while (curs < n && st[curs].lev >= bu[curb].diff) q.push(st[curs++]);
    if (q.empty())
      break;
    else {
      int cla = q.top().cla, lev = q.top().lev, index = q.top().index;
      q.pop();
      bugfix[bu[curb].index] = index;
      use[index]++;
      if (use[index] < days) q.push(stu(lev, 0, index));
      useclass += cla;
    }
    curb++;
  }
  if (curb < m || useclass > s)
    return false;
  else
    return true;
}
int ansbugfix[110000];
int main() {
  while (cin >> n >> m >> s) {
    int a, b, c;
    for (int i = 0; i < m; i++) {
      scanf("%d", &a);
      bu[i] = bug(a, i);
    }
    for (int i = 0; i < n; i++) {
      scanf("%d", &st[i].lev);
    }
    for (int i = 0; i < n; i++) {
      scanf("%d", &st[i].cla);
      st[i].index = i;
    }
    sort(bu, bu + m);
    sort(st, st + n);
    int l = 1, r = m, ans = m + 10;
    while (l <= r) {
      int mid = (l + r) / 2;
      if (fix_day(mid) == true) {
        ans = mid, r = mid - 1;
        memcpy(ansbugfix, bugfix, sizeof(bugfix));
      } else
        l = mid + 1;
    }
    if (ans == m + 10)
      printf("NO\n");
    else {
      printf("YES\n");
      printf("%d", ansbugfix[0] + 1);
      for (int i = 1; i < m; i++) printf(" %d", ansbugfix[i] + 1);
      printf("\n");
    }
  }
  return 0;
}
