#include <bits/stdc++.h>
using namespace std;
const int DIM = 100006;
tuple<int, int, int> stu[DIM];
pair<int, int> bug[DIM];
int ans[DIM];
priority_queue<pair<int, int>, vector<pair<int, int>>, greater<pair<int, int>>>
    prq;
bool solve(int x, int n, int m, int s) {
  while (!prq.empty()) prq.pop();
  int sum = 0;
  for (int i = m, j = n; i >= 1; i -= x) {
    while (j > 0 && get<0>(stu[j]) >= bug[i].first) {
      prq.push(make_pair(get<1>(stu[j]), get<2>(stu[j])));
      j--;
    }
    if (prq.empty()) return false;
    pair<int, int> pr = prq.top();
    prq.pop();
    sum += pr.first;
    if (sum > s) return false;
    for (int k = i; k > max(0, i - x); k--) ans[bug[k].second] = pr.second;
  }
  return true;
}
int main(void) {
  int n, m, s;
  scanf("%d %d %d", &n, &m, &s);
  for (int i = 1; i <= m; i++) {
    int x;
    scanf("%d", &x);
    bug[i] = make_pair(x, i);
  }
  for (int i = 1; i <= n; i++) {
    int x;
    scanf("%d", &x);
    get<0>(stu[i]) = x;
  }
  for (int i = 1; i <= n; i++) {
    int x;
    scanf("%d", &x);
    get<1>(stu[i]) = x;
    get<2>(stu[i]) = i;
  }
  sort(bug + 1, bug + m + 1);
  sort(stu + 1, stu + n + 1);
  int le = 1, ri = n, mi;
  while (le <= ri) {
    mi = le + (ri - le) / 2;
    if (solve(mi, n, m, s))
      ri = mi - 1;
    else
      le = mi + 1;
  }
  if (solve(le, n, m, s)) {
    printf("YES\n");
    for (int i = 1; i <= m; i++) printf("%d ", ans[i]);
  } else
    printf("NO\n");
  return 0;
}
