#include <bits/stdc++.h>
using namespace std;
const int N = 200005;
int bugs, studs, exams;
int ans[N];
pair<int, int> bug[N];
pair<int, pair<int, int> > stud[N];
set<pair<int, int> > smart;
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() {
  scanf("%d%d%d", &studs, &bugs, &exams);
  for (int i = 0; i < bugs; i++) {
    scanf("%d", &(bug[i].first));
    bug[i].second = i;
  }
  for (int i = 0; i < studs; i++) scanf("%d", &(stud[i].first));
  for (int i = 0; i < studs; i++) {
    scanf("%d", &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 l = 1, r = bugs + 1;
  while (l < r) {
    int mid = (l + r) / 2;
    if (solve(mid) <= exams)
      r = mid;
    else
      l = mid + 1;
  }
  if (l > bugs) {
    puts("NO");
    return 0;
  }
  solve(l);
  puts("YES");
  for (int i = 0; i < bugs - 1; i++) printf("%d ", ans[i] + 1);
  printf("%d\n", ans[bugs - 1] + 1);
  return 0;
}
