#include <bits/stdc++.h>
using namespace std;
const int N = 100010;
int n, m, s, p[N];
struct student {
  int idx, level, money;
  bool operator<(const student &str) const { return level > str.level; }
};
student st[N];
priority_queue<pair<int, int> > rem, have;
int ans[N];
int final[N];
int main() {
  scanf("%d%d%d", &n, &m, &s);
  for (int i = 0; i < m; ++i) {
    scanf("%d", &p[i]);
  }
  for (int i = 0; i < n; ++i) {
    scanf("%d", &st[i].level);
  }
  for (int i = 0; i < n; ++i) {
    scanf("%d", &st[i].money);
    st[i].idx = i + 1;
  }
  sort(st, st + n);
  int lo = 0, hi = N;
  bool there = false;
  while (lo <= hi) {
    int mid = (lo + hi) / 2;
    int idx = 0;
    long long total = 0;
    while (!have.empty()) have.pop();
    while (!rem.empty()) rem.pop();
    for (int i = 0; i < m; ++i) rem.push(make_pair(p[i], i));
    bool can = true;
    while (!rem.empty()) {
      int mx = rem.top().first;
      while (mx <= st[idx].level) {
        have.push(make_pair(-st[idx].money, st[idx].idx));
        idx++;
      }
      if (have.empty()) {
        can = false;
        break;
      }
      int lft = mid;
      total += 1LL * -have.top().first;
      int res = have.top().second;
      have.pop();
      while (lft > 0 && !rem.empty()) {
        ans[rem.top().second] = res;
        rem.pop();
        lft--;
      }
    }
    if (total > s) can = false;
    if (can) {
      there = true;
      for (int i = 0; i < m; ++i) {
        final[i] = ans[i];
      }
      hi = mid - 1;
    } else {
      lo = mid + 1;
    }
  }
  if (!there) {
    puts("NO");
    return 0;
  }
  puts("YES");
  for (int i = 0; i < m; ++i) {
    if (i) printf(" ");
    printf("%d", final[i]);
  }
  puts("");
  return 0;
}
