#include <bits/stdc++.h>
using namespace std;
int bugs, studs, exams;
pair<int, int> bug[100005];
pair<int, pair<int, int> > stud[100005];
int ans[100005];
int cnt[100005];
long long solve(int days) {
  for (int i = 1; i <= studs; i++) cnt[i] = days;
  long long sum = 0;
  priority_queue<pair<int, int>, vector<pair<int, int> >,
                 greater<pair<int, int> > >
      PQ;
  int last = studs;
  for (int i = bugs; i; i--) {
    while (last && stud[last].first >= bug[i].first)
      PQ.push(stud[last--].second);
    if (PQ.empty()) return (1LL) << 59;
    pair<int, int> p = PQ.top();
    PQ.pop();
    ans[bug[i].second] = p.second;
    sum += p.first;
    p.first = 0;
    cnt[p.second]--;
    if (cnt[p.second]) PQ.push(p);
  }
  return sum;
}
int main() {
  cin >> studs >> bugs >> exams;
  for (int i = 1; i <= bugs; i++) {
    cin >> bug[i].first;
    bug[i].second = i;
  }
  for (int i = 1; i <= studs; i++) cin >> stud[i].first;
  for (int i = 1; i <= studs; i++) {
    cin >> stud[i].second.first;
    stud[i].second.second = i;
  }
  sort(bug + 1, bug + bugs + 1);
  sort(stud + 1, stud + studs + 1);
  int lo = 1, hi = bugs + 1;
  while (lo < hi) {
    int mid = (lo + hi) / 2;
    if (solve(mid) <= exams)
      hi = mid;
    else
      lo = mid + 1;
  }
  if (lo > bugs) {
    cout << "NO\n";
    return 0;
  }
  solve(lo);
  cout << "YES\n";
  for (int i = 1; i <= bugs; i++) cout << ans[i] << " ";
  cout << '\n';
  return 0;
}
