#include <bits/stdc++.h>
using namespace std;
pair<pair<int, int>, int> a[111111];
int s, n, m;
pair<int, int> comp[111111];
int o[111111];
priority_queue<pair<int, int> > q;
bool chk(int num) {
  int now = s, j = 0;
  while (!q.empty()) q.pop();
  for (int i = 0; i < m; i += num) {
    while (j < n && a[j].first.first >= comp[i].first) {
      q.push(make_pair(-a[j].first.second, a[j].second));
      j++;
    }
    if (q.empty()) return false;
    now += q.top().first;
    if (now < 0) return false;
    for (int k = 0; k < num && i + k < m; k++)
      o[comp[i + k].second] = q.top().second;
    q.pop();
  }
  return true;
}
int main() {
  scanf("%d%d%d", &n, &m, &s);
  for (int i = 0; i < m; i++) scanf("%d", &comp[i].first), comp[i].second = i;
  sort(comp, comp + m);
  reverse(comp, comp + m);
  for (int i = 0; i < n; i++) scanf("%d", &a[i].first.first), a[i].second = i;
  for (int i = 0; i < n; i++) scanf("%d", &a[i].first.second);
  sort(a, a + n);
  reverse(a, a + n);
  if (a[0].first.first < comp[0].first || !chk(m)) {
    puts("NO");
    return 0;
  }
  puts("YES");
  int lo = 1, hi = m, ans;
  while (lo <= hi) {
    int mi = (lo + hi) >> 1;
    if (chk(mi))
      ans = mi, hi = mi - 1;
    else
      lo = mi + 1;
  }
  chk(ans);
  for (int i = 0; i < m; i++) printf("%d%c", o[i] + 1, i < m - 1 ? ' ' : '\n');
  return 0;
}
