#include <bits/stdc++.h>
using namespace std;
template <class T>
T sqr(T x) {
  return x * x;
}
const int INF = 1000 * 1000 * 1000;
const long long INF64 = sqr(static_cast<long long>(INF));
const double PI = acos(-1.0);
const int N = 100500;
struct Student {
  int id;
  int cost;
  int skill;
};
bool operator<(const Student& l, const Student& r) {
  if (l.skill != r.skill) return l.skill > r.skill;
  if (l.cost != r.cost)
    return l.cost < r.cost;
  else
    return l.id < r.id;
}
struct scmp {
  bool operator()(const Student& l, const Student& r) {
    if (l.cost != r.cost) return l.cost < r.cost;
    if (l.skill != r.skill)
      return l.skill > r.skill;
    else
      return l.id < r.id;
  }
};
struct Bug {
  int id;
  int dif;
};
bool operator<(const Bug& l, const Bug& r) {
  if (l.dif != r.dif)
    return l.dif > r.dif;
  else
    return l.id < r.id;
}
int n, m, s;
Student students[N];
Bug bugs[N];
int ans[N], p;
int output[N];
set<Student, scmp> cs;
int cnt(int t) { return (m - 1) / t + 1; }
long long solve(int t) {
  int k = cnt(t);
  if (n < k) return INF64;
  long long cost = 0;
  p = 0;
  cs.clear();
  for (int i = 0, j = 0; i < k; ++i) {
    int l = i * t;
    while (j < n && bugs[l].dif <= students[j].skill) {
      cs.insert(students[j]);
      ++j;
    }
    if (cs.empty()) return INF64;
    set<Student, scmp>::iterator it = cs.begin();
    ans[p++] = it->id;
    cost += it->cost;
    cs.erase(it);
  }
  return cost;
}
int main() {
  scanf("%d %d %d", &n, &m, &s);
  for (int i = 0; i < m; ++i) {
    scanf("%d", &bugs[i].dif);
    bugs[i].id = i;
  }
  for (int i = 0; i < n; ++i) {
    scanf("%d", &students[i].skill);
    students[i].id = i + 1;
  }
  for (int i = 0; i < n; ++i) {
    scanf("%d", &students[i].cost);
  }
  sort(bugs, bugs + m);
  sort(students, students + n);
  if (solve(m) > s) {
    printf("NO\n");
    return 0;
  }
  int l = 0, r = m;
  while (r - l > 1) {
    int mid = (l + r) / 2;
    if (solve(mid) <= s)
      r = mid;
    else
      l = mid;
  }
  solve(r);
  printf("YES\n");
  for (int i = 0; i < p; ++i)
    for (int j = i * r; j < (i + 1) * r && j < m; ++j)
      output[bugs[j].id] = ans[i];
  for (int i = 0; i < m; ++i) printf("%d ", output[i]);
  printf("\n");
  return 0;
}
