#include <bits/stdc++.h>
using namespace std;
clock_t _start_clock = clock();
inline void _time() {}
inline int log(const char *format, ...) { return 0; }
const double EPS = 10e-8;
const int MAX = 100005;
const int INF = 1 << 30;
struct Student {
  int skills, cost, index;
  Student() {}
  bool operator<(const Student &b) const { return cost < b.cost; }
};
Student S[MAX];
pair<int, int> B[MAX];
int A[MAX];
int n, m, sum;
bool cmp(const Student &a, const Student &b) { return a.skills < b.skills; }
bool test(int days) {
  multiset<Student> Q;
  multiset<Student>::iterator first;
  int j = n - 1, i = m - 1;
  int left = sum;
  while (i >= 0) {
    while (j >= 0 && S[j].skills >= B[i].first) {
      Q.insert(S[j]);
      j--;
    }
    if (Q.size() == 0 || left < Q.begin()->cost) return false;
    first = Q.begin();
    left -= first->cost;
    for (int k = 0; k < days && i >= 0; k++) {
      A[B[i].second] = first->index;
      i--;
    }
    Q.erase(first);
  }
  return true;
}
int main(int argc, char **argv) {
  int i;
  scanf("%d %d %d", &n, &m, &sum);
  for (i = 0; i < m; i++) {
    scanf("%d", &B[i].first);
    B[i].second = i;
  }
  for (i = 0; i < n; i++) {
    scanf("%d", &S[i].skills);
    S[i].index = i;
  }
  for (i = 0; i < n; i++) scanf("%d", &S[i].cost);
  sort(B, B + m);
  sort(S, S + n, cmp);
  int low = 0, high = n + 1;
  if (!test(high)) {
    printf("NO");
    return 0;
  }
  while (low < high) {
    int mid = (low + high) / 2;
    if (test(mid))
      high = mid;
    else
      low = mid + 1;
  }
  printf("YES\n");
  test(high);
  for (i = 0; i < m; i++) printf("%d ", A[i] + 1);
  return EXIT_SUCCESS;
}
