#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 10;
const int M = 128;
const int inf = 0x7fffffff;
const long long INF = 9E18;
const int mod = 1e9 + 7;
const int eps = 1e-7;
pair<int, int> stu[maxn], bug[maxn];
int c[maxn], n, m, s;
int ans[maxn];
bool check(int mid) {
  priority_queue<pair<int, int>, vector<pair<int, int> >,
                 greater<pair<int, int> > >
      q;
  int now = 1;
  long long cost = 0;
  for (int i = 1; i <= m; i += mid) {
    while (now <= n) {
      if (stu[now].first >= bug[i].first) {
        q.push(make_pair(c[stu[now].second], stu[now].second));
        now++;
      } else
        break;
    }
    if (q.size() == 0) return 0;
    pair<int, int> tmp = q.top();
    q.pop();
    cost += tmp.first;
    if (cost > s) return 0;
    for (int j = i; j < i + mid && j <= m; j++) ans[bug[j].second] = tmp.second;
  }
  return 1;
}
int main() {
  scanf("%d%d%d", &n, &m, &s);
  for (int i = 1; i <= m; i++) {
    scanf("%d", &bug[i].first);
    bug[i].second = i;
  }
  for (int i = 1; i <= n; i++) {
    scanf("%d", &stu[i].first);
    stu[i].second = i;
  }
  for (int i = 1; i <= n; i++) scanf("%d", &c[i]);
  sort(bug + 1, bug + m + 1);
  reverse(bug + 1, bug + m + 1);
  sort(stu + 1, stu + n + 1);
  reverse(stu + 1, stu + n + 1);
  if (!check(m)) {
    puts("NO");
    return 0;
  }
  int l = 1, r = m;
  int anss = 0;
  while (l <= r) {
    int mid = (l + r) >> 1;
    if (check(mid)) {
      r = mid - 1;
      anss = mid;
    } else
      l = mid + 1;
  }
  check(anss);
  puts("YES");
  for (int i = 1; i <= m; i++) {
    cout << ans[i] << " ";
  }
  return 0;
}
