#include <bits/stdc++.h>
using namespace std;
struct student {
  int skill, cost, i;
} students[100002];
struct bug {
  int skill, i;
} bugs[100002];
int cost[100002];
int solver[100002];
bool operator<(student a, student b) { return a.skill < b.skill; }
bool operator<(bug a, bug b) { return a.skill > b.skill; }
struct SegmentTree {
  int tree[100002 * 4];
  int create(int node, int l, int r) {
    if (l == r) return tree[node] = l;
    int L = create((node * 2), l, ((l + r) / 2));
    int R = create((node * 2 + 1), ((l + r) / 2) + 1, r);
    if (cost[L] < cost[R]) return tree[node] = L;
    return tree[node] = R;
  }
  int update(int node, int l, int r, int a) {
    if (a < l || r < a) return tree[node];
    if (a <= l && r <= a) return tree[node] = l;
    int L = update((node * 2), l, ((l + r) / 2), a);
    int R = update((node * 2 + 1), ((l + r) / 2) + 1, r, a);
    if (cost[L] < cost[R]) return tree[node] = L;
    return tree[node] = R;
  }
  int query(int node, int l, int r, int a, int b) {
    if (b < l || r < a) return -1;
    if (a <= l && r <= b) return tree[node];
    int L = query((node * 2), l, ((l + r) / 2), a, b);
    int R = query((node * 2 + 1), ((l + r) / 2) + 1, r, a, b);
    if (L == -1) return R;
    if (R == -1) return L;
    if (cost[L] < cost[R]) return L;
    return R;
  }
  void init(int n) { create(1, 0, n - 1); }
} minCost;
int lowerSkill(int skill, int n) {
  int left = 0, right = n - 1;
  while (left < right) {
    int mid = (left + right) / 2;
    if (students[mid].skill < skill)
      left = mid + 1;
    else
      right = mid;
  }
  return left;
}
bool fixBugs(int d, int n, int m, int s, bool final) {
  for (int i = 0; i < n; i++) cost[i] = students[i].cost;
  minCost.init(n);
  for (int i = 0; i < m; i += d) {
    int j = lowerSkill(bugs[i].skill, n);
    if (students[j].skill < bugs[i].skill) return false;
    int c = minCost.query(1, 0, n - 1, j, n - 1);
    if (s - cost[c] < 0) return false;
    for (int j = 0; j < d && i + j < m && final; j++)
      solver[bugs[i + j].i] = students[c].i;
    s -= cost[c];
    cost[c] = 2000000000;
    minCost.update(1, 0, n - 1, c);
  }
  return true;
}
int binSearch(int n, int m, int s) {
  int left = 1, right = m;
  while (left < right) {
    int mid = (left + right) / 2;
    if (fixBugs(mid, n, m, s, false))
      right = mid;
    else
      left = mid + 1;
  }
  if (fixBugs(left, n, m, s, true)) return left;
  return 0;
}
int main() {
  int n, m, s;
  scanf("%d%d%d", &n, &m, &s);
  for (int i = 0; i < m; i++) {
    scanf("%d", &bugs[i].skill);
    bugs[i].i = i;
  }
  for (int i = 0; i < n; i++) {
    scanf("%d", &students[i].skill);
    students[i].i = i + 1;
  }
  for (int i = 0; i < n; i++) scanf("%d", &students[i].cost);
  sort(students, students + n);
  sort(bugs, bugs + m);
  if (binSearch(n, m, s) > 0) {
    puts("YES");
    for (int i = 0; i < m; i++) printf("%d ", solver[i]);
    printf("\n");
  } else
    puts("NO");
  return 0;
}
