#include <bits/stdc++.h>
using namespace std;
int n, m, s;
pair<int, int> b[100000];
pair<pair<int, int>, int> t[100000];
int res[1000000];
bool save = false;
bool ok(int d) {
  long long tot = 0;
  int ind = n - 1;
  set<pair<int, int> > tt;
  for (int i = m - 1; i > -1;) {
    while (ind > -1 && t[ind].first.first >= b[i].first) {
      tt.insert(make_pair(t[ind].first.second, t[ind].second));
      ind--;
    }
    if (tt.empty()) return false;
    pair<int, int> p = *(tt.begin());
    tt.erase(tt.begin());
    tot += p.first;
    if (save) {
      for (int k = i; k > i - d && k > -1; --k) res[b[k].second] = p.second;
    }
    i -= d;
  }
  return tot <= (long long)s;
}
void printRes() {
  printf("YES\n");
  for (int i = 0; i < m; ++i) printf("%d ", res[i] + 1);
  printf("\n");
}
int main() {
  scanf("%d%d%d", &n, &m, &s);
  for (int i = 0; i < m; ++i) {
    b[i].second = i;
    scanf("%d", &b[i].first);
  }
  for (int i = 0; i < n; ++i) {
    t[i].second = i;
    scanf("%d", &t[i].first.first);
  }
  for (int i = 0; i < n; ++i) scanf("%d", &t[i].first.second);
  sort(b, b + m);
  sort(t, t + n);
  int low = 1;
  int high = m;
  while (high - low > 1) {
    int mid = (low + high) / 2;
    if (ok(mid))
      high = mid;
    else
      low = mid;
  }
  save = true;
  if (ok(low))
    printRes();
  else if (ok(high))
    printRes();
  else
    printf("NO\n");
  return 0;
}
