#include <bits/stdc++.h>
using namespace std;
struct fuck {
  long long f;
  long long s;
  long long id;
};
fuck you[100005], me[100005];
long long n, m, s;
bool cmp1(fuck you1, fuck you2) { return you1.f > you2.f; }
struct cmp {
  bool operator()(const fuck& l, const fuck& r) { return l.s > r.s; }
};
long long temp[100005];
long long a[100005];
long long arr[100005];
long long fin[100005];
long long check(long long days) {
  if (days == 0) return 0;
  priority_queue<fuck, vector<fuck>, cmp> pq;
  long long i, j = 0, ans = 0;
  i = 0;
  while (i < n) {
    while (j < m && you[j].f >= a[i]) {
      pq.push(you[j]);
      ++j;
    }
    if (pq.empty()) return 0;
    fuck bitch = pq.top();
    pq.pop();
    ans += bitch.s;
    for (int k = 0; k < days && i < n; ++k) {
      arr[me[i].id] = bitch.id;
      ++i;
    }
  }
  if (ans > s)
    return 0;
  else {
    for (i = 0; i < n; ++i) fin[i] = arr[i];
    return 1;
  }
}
long long binary_search() {
  long long st = 0;
  long long ft = 100005;
  long long ans = 1000000000000;
  while (st <= ft) {
    long long mid = (st + ft) / 2;
    if (check(mid)) {
      ans = mid;
      ft = mid - 1;
    } else {
      st = mid + 1;
    }
  }
  return ans;
}
int main() {
  std::ios::sync_with_stdio(false);
  long long i;
  cin >> m >> n >> s;
  for (i = 0; i < n; ++i) cin >> me[i].f;
  for (i = 0; i < m; ++i) cin >> you[i].f;
  for (i = 0; i < m; ++i) cin >> you[i].s;
  for (i = 0; i < m; ++i) you[i].id = i + 1;
  for (i = 0; i < n; ++i) me[i].id = i;
  sort(&me[0], &me[n], cmp1);
  for (i = 0; i < n; ++i) a[i] = me[i].f;
  sort(&you[0], &you[m], cmp1);
  long long ans = binary_search();
  if (ans == 1000000000000) {
    cout << "NO\n";
  } else {
    cout << "YES\n";
    for (i = 0; i < n; ++i) cout << fin[i] << " ";
  }
  return 0;
}
