#include <bits/stdc++.h>
using namespace std;
const long long inf = 1000000000000LL;
int n, m, s;
int a[100005];
int b[100005];
int c[100005];
vector<pair<int, int> > B;
vector<pair<pair<int, int>, int> > S;
int cc[100005];
struct cmp {
  bool operator()(int a, int b) {
    if (cc[a] == cc[b]) return a < b;
    return cc[a] < cc[b];
  }
};
int sol[100005];
int cnt[100005];
set<int, cmp> pq;
long long cost(int days) {
  if (days == 0) return 0;
  for (int i = (0); i < (n); ++i) cnt[i] = days, cc[i] = S[i].first.second;
  int cs = -1;
  long long ret = 0;
  for (int i = (0); i < (m); ++i) {
    while (cs + 1 < n && S[cs + 1].first.first >= B[i].first) pq.insert(++cs);
    if (pq.empty()) return inf;
    int s = *pq.begin();
    pq.erase(pq.begin());
    ret += cc[s];
    sol[B[i].second] = S[s].second;
    cc[s] = 0;
    if (--cnt[s]) pq.insert(s);
  }
  pq.clear();
  return ret;
}
int main(void) {
  scanf("%d%d%d", &n, &m, &s);
  for (int i = (0); i < (m); ++i) scanf("%d", a + i);
  for (int i = (0); i < (n); ++i) scanf("%d", b + i);
  for (int i = (0); i < (n); ++i) scanf("%d", c + i);
  for (int i = (0); i < (m); ++i) B.push_back({a[i], i});
  for (int i = (0); i < (n); ++i) S.push_back({{b[i], c[i]}, i});
  sort(B.rbegin(), B.rend());
  sort(S.rbegin(), S.rend());
  int lo = 1, hi = m + 1, mid;
  while (lo < hi) {
    mid = (lo + hi) / 2;
    if (cost(mid) > s)
      lo = mid + 1;
    else
      hi = mid;
  }
  cost(lo);
  if (lo == m + 1)
    puts("NO");
  else {
    puts("YES");
    for (int i = (0); i < (m); ++i) printf("%d ", sol[i] + 1);
    puts("");
  }
  return 0;
}
