#include <bits/stdc++.h>
using namespace std;
const int T = 100000 + 50;
int n, m, s;
pair<int, int> bug[T];
pair<int, pair<int, int> > stu[T];
set<pair<int, int> > se;
int val[T];
long long slove(int x) {
  long long sum = 0;
  int c = 0;
  se.clear();
  for (int i = 0; i < m; i += x) {
    while (c < n && stu[c].first >= bug[i].first) {
      se.insert(stu[c].second);
      c++;
    }
    if (se.empty()) {
      return (long long)1e18;
    }
    pair<int, int> t = *(se.begin());
    sum += t.first;
    se.erase(se.begin());
    for (int j = i; j < m && j < i + x; ++j) {
      val[bug[j].second] = t.second + 1;
    }
  }
  return sum;
}
int main() {
  int i, j, k;
  while (~scanf("%d%d%d", &n, &m, &s)) {
    for (i = 0; i < m; ++i) {
      scanf("%d", &bug[i].first);
      bug[i].second = i;
    }
    for (i = 0; i < n; ++i) {
      scanf("%d", &stu[i].first);
    }
    for (i = 0; i < n; ++i) {
      scanf("%d", &stu[i].second.first);
      stu[i].second.second = i;
    }
    sort(bug, bug + m);
    reverse(bug, bug + m);
    sort(stu, stu + n);
    reverse(stu, stu + n);
    int L = 1, R = m + 1, mid;
    while (L < R) {
      mid = (L + R) / 2;
      if (slove(mid) <= s)
        R = mid;
      else
        L = mid + 1;
    }
    if (L >= m + 1) {
      printf("NO\n");
      continue;
    }
    printf("YES\n");
    slove(L);
    for (i = 0; i < m - 1; ++i) printf("%d ", val[i]);
    printf("%d\n", val[m - 1]);
  }
  return 0;
}
