#include <bits/stdc++.h>
using namespace std;
const int MAX = 100100;
int N, M, S;
struct Student {
  int index, ability, passes;
} students[MAX];
bool operator<(const Student &A, const Student &B) {
  return A.passes > B.passes;
}
bool cmp_ability(const Student &A, const Student &B) {
  return A.ability > B.ability;
}
struct Bug {
  int index, complexity;
} bugs[MAX];
bool operator<(const Bug &A, const Bug &B) {
  return A.complexity > B.complexity;
}
int ans[MAX];
int check(int D) {
  priority_queue<Student> Q;
  int i = 0;
  int cost = 0;
  for (int j = 0; j < M; j += D) {
    while (i < N && students[i].ability >= bugs[j].complexity) {
      Q.push(students[i]);
      ++i;
    }
    if (Q.empty()) return 0;
    for (int k = 0; k < (D); ++k)
      if (j + k < M) ans[bugs[j + k].index] = Q.top().index;
    cost += Q.top().passes;
    if (cost > S) return 0;
    Q.pop();
  }
  return 1;
}
int main() {
  scanf("%d%d%d", &N, &M, &S);
  for (int i = 0; i < (M); ++i) {
    bugs[i].index = i;
    scanf("%d", &bugs[i].complexity);
  }
  sort(bugs, bugs + M);
  for (int i = 0; i < (N); ++i) {
    students[i].index = i;
    scanf("%d", &students[i].ability);
  }
  for (int i = 0; i < (N); ++i) scanf("%d", &students[i].passes);
  sort(students, students + N, cmp_ability);
  int lo = 1, hi = M;
  while (lo < hi) {
    int mid = (lo + hi) / 2;
    check(mid) ? hi = mid : lo = mid + 1;
  }
  if (check(lo)) {
    puts("YES");
    for (int i = 0; i < (M); ++i) printf("%d%c", ans[i] + 1, " \n"[i + 1 == M]);
  } else {
    puts("NO");
  }
  return 0;
}
