#include <bits/stdc++.h>
using namespace std;
int n, m, s;
int A[100100], B[100100], C[100100];
struct cmp {
  bool operator()(int a, int b) { return C[a] < C[b]; }
};
multiset<int, cmp> Set;
int pos_b[100100];
int pos_s[100100];
int curr_sol[100100];
int sol[100100];
bool cmp_b(int a, int b) { return A[a] > A[b]; }
bool cmp_s(int a, int b) { return B[a] > B[b]; }
void read_data() {
  cin >> n >> m >> s;
  for (int i = 1; i <= m; i++) {
    cin >> A[i];
    pos_b[i] = i;
  }
  for (int i = 1; i <= n; i++) {
    cin >> B[i];
    pos_s[i] = i;
  }
  for (int i = 1; i <= n; i++) cin >> C[i];
  sort(pos_b + 1, pos_b + m + 1, cmp_b);
  sort(pos_s + 1, pos_s + n + 1, cmp_s);
}
bool is_possible(int days) {
  Set.clear();
  int bug;
  int student = 1;
  long long sum = 0;
  for (bug = 1; bug <= m; bug += days) {
    while (student <= n && B[pos_s[student]] >= A[pos_b[bug]]) {
      Set.insert(pos_s[student]);
      student++;
    }
    if (Set.empty()) {
      return false;
    }
    int min_stud = *(Set.begin());
    Set.erase(Set.begin());
    sum += (long long)C[min_stud];
    if (sum > (long long)s) return false;
    for (int i = bug; i <= bug + days - 1 && i <= m; i++)
      curr_sol[pos_b[i]] = min_stud;
  }
  return true;
}
void solve() {
  int left = 1, right = m, middle;
  int solution = m + 1;
  while (left <= right) {
    middle = (left + right) >> 1;
    if (is_possible(middle)) {
      solution = middle;
      right = middle - 1;
      for (int i = 1; i <= m; i++) sol[i] = curr_sol[i];
    } else {
      left = middle + 1;
    }
  }
  if (solution == m + 1) {
    cout << "NO\n";
    return;
  }
  cout << "YES\n";
  for (int i = 1; i <= m; i++) cout << sol[i] << " ";
  cout << "\n";
}
int main() {
  read_data();
  solve();
  return 0;
}
