#include <bits/stdc++.h>
long long mpow(long long a, long long n, long long mod) {
  long long ret = 1;
  long long b = a;
  while (n) {
    if (n & 1) ret = (ret * b) % mod;
    b = (b * b) % mod;
    n >>= 1;
  }
  return (long long)ret;
}
using namespace std;
int n, m, s;
pair<int, int> bug[(int)(1e5 + 25)];
int ANS[(int)(1e5 + 25)];
pair<pair<int, int>, int> ch[(int)(1e5 + 25)];
bool chk(int x) {
  priority_queue<pair<int, int> > pq;
  long long ans = 0;
  int last = m;
  for (int i = n; i >= 1;) {
    int j = i;
    while (j > 0 && ch[j].first.first >= bug[last].first) {
      pq.push(make_pair(-ch[j].first.second, ch[j].second));
      j--;
    }
    i = j;
    if (j == 0) {
      break;
    }
    if (pq.empty()) {
      return 0;
    }
    pair<int, int> temp = pq.top();
    pq.pop();
    int dum = x;
    ans += (-temp.first);
    while (last > 0 && dum > 0) {
      ANS[bug[last].second] = temp.second;
      dum--;
      last--;
    }
    if (last <= 0) {
      break;
    }
  }
  while (last > 0) {
    if (pq.empty()) {
      return 0;
    }
    pair<int, int> temp = pq.top();
    pq.pop();
    int dum = x;
    ans += (-temp.first);
    while (last > 0 && dum > 0) {
      ANS[bug[last].second] = temp.second;
      dum--;
      last--;
    }
  }
  return (ans <= s);
}
void solve() {
  scanf("%d", &n);
  scanf("%d", &m);
  scanf("%d", &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", &ch[i].first.first);
  }
  for (int i = 1; i <= n; i++) {
    scanf("%d", &ch[i].first.second);
    ch[i].second = i;
  }
  sort(bug + 1, bug + m + 1);
  sort(ch + 1, ch + n + 1);
  int lo = 1, hi = m;
  while (lo < hi) {
    int mid = (lo + hi) >> 1;
    if (chk(mid)) {
      hi = mid;
    } else {
      lo = mid + 1;
    }
  }
  if (!chk(lo)) {
    printf("NO");
    return;
  }
  printf("YES\n");
  for (int i = 1; i <= m; i++) {
    cout << ANS[i] << " ";
  }
}
int main() {
  int t = 1;
  for (int i = 1; i <= t; i++) {
    solve();
  }
  return 0;
}
