#include <bits/stdc++.h>
using namespace std;
struct student {
  int b, c;
  int ind;
};
bool cmp_b(const student& A, const student& B) { return A.b < B.b; }
struct cmp_c {
  bool operator()(const student& A, const student& B) { return A.c > B.c; }
};
struct bug {
  int a;
  int ind;
};
bool cmp_a(const bug& A, const bug& B) { return A.a < B.a; }
const int MX = 100 * 1000 + 9;
bug B[MX];
student S[MX];
int ans[MX];
int n, m, s;
bool possible(int dur) {
  priority_queue<student, vector<student>, cmp_c> Q;
  int iter_bug = m - 1, iter_student = n - 1;
  int pass_left = s;
  while (iter_bug >= 0) {
    int bug_diff = B[iter_bug].a;
    while (iter_student >= 0 && S[iter_student].b >= bug_diff) {
      Q.push(S[iter_student]);
      iter_student--;
    }
    if (Q.empty()) return false;
    student S = Q.top();
    Q.pop();
    if (S.c > pass_left) return false;
    pass_left -= S.c;
    for (int k = 0; k < dur && 0 <= iter_bug; k++) {
      ans[B[iter_bug].ind] = S.ind;
      iter_bug--;
    }
  }
  return true;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> n >> m >> s;
  for (int i = 0; i < m; i++) {
    cin >> B[i].a;
    B[i].ind = i;
  }
  for (int i = 0; i < n; i++) {
    cin >> S[i].b;
  }
  for (int i = 0; i < n; i++) {
    cin >> S[i].c;
    S[i].ind = i;
  }
  sort(B, B + m, cmp_a);
  sort(S, S + n, cmp_b);
  if (possible(m)) {
    int L = 1, R = m, M;
    while (R - L > 1) {
      M = (L + R) >> 1;
      if (possible(M))
        R = M;
      else
        L = M;
    }
    int res;
    if (possible(L))
      res = L;
    else
      res = R;
    possible(res);
    cout << "YES\n";
    for (int i = 0; i < m; i++) cout << ans[i] + 1 << ' ';
  } else
    cout << "NO";
  return 0;
}
