#include <bits/stdc++.h>
using namespace std;
int bugs, studs, exams;
pair<int, int> bug[100010];
pair<int, pair<int, int> > stud[100010];
set<pair<int, int> > smart;
int ans[100010];
long long solve(int days) {
  long long sum = 0;
  smart.clear();
  int last = 0;
  for (int i = 0; i < bugs; i += days) {
    while (last < studs && stud[last].first >= bug[i].first) {
      smart.insert(stud[last].second);
      last++;
    }
    if (smart.empty()) return (long long)1e18;
    pair<int, int> t = *(smart.begin());
    smart.erase(smart.begin());
    sum += t.first;
    for (int j = i; j < bugs && j < i + days; j++)
      ans[bug[j].second] = t.second;
  }
  return sum;
}
int main() {
  cin >> studs >> bugs >> exams;
  for (int i = 0; i < bugs; i++) {
    cin >> bug[i].first;
    bug[i].second = i;
  }
  for (int i = 0; i < studs; i++) cin >> stud[i].first;
  for (int i = 0; i < studs; i++) {
    cin >> stud[i].second.first;
    stud[i].second.second = i;
  }
  sort(bug, bug + bugs);
  reverse(bug, bug + bugs);
  sort(stud, stud + studs);
  reverse(stud, stud + studs);
  int ll = 1, rr = bugs + 1;
  while (ll < rr) {
    int mid = (ll + rr) >> 1;
    if (solve(mid) <= exams)
      rr = mid;
    else
      ll = mid + 1;
  }
  if (ll > bugs) {
    cout << "NO" << endl;
    return 0;
  }
  solve(ll);
  cout << "YES" << endl;
  for (int i = 0; i < bugs; i++) cout << ans[i] + 1 << ' ';
  return 0;
}
