#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
long long n, m, a, b, c, k, temp, x, y, s;
const int MAXN = 100000 + 11;
inline long long max(long long a, long long b) { return ((a > b) ? a : b); }
inline long long min(long long a, long long b) { return ((a > b) ? b : a); }
inline long long gcd(long long a, long long b) {
  if (b == 0) return a;
  a %= b;
  return gcd(b, a);
}
inline vector<long long> read(int n) {
  vector<long long> v(n);
  for (int i = 0; i < v.size(); i++) cin >> v[i];
  return v;
}
pair<long long, long long> tree[200000];
int pass[100000], pos[100000];
vector<pair<long long, long long> > bug;
pair<long long, long long> combine(const pair<long long, long long> &p1,
                                   const pair<long long, long long> &p2) {
  if (p1.first < p2.first) return p1;
  return p2;
}
void bfst() {
  for (int i = n - 1; i > 0; --i)
    tree[i] = combine(tree[i << 1], tree[i << 1 | 1]);
}
void modify(int p, int value) {
  for (tree[p += n].first = value; p > 1; p >>= 1)
    tree[p >> 1] = combine(tree[p], tree[p ^ 1]);
}
pair<long long, long long> qfst(int l, int r) {
  pair<long long, long long> res = {1e9 + 1, 0};
  for (l += n, r += n; l < r; l >>= 1, r >>= 1) {
    if (l & 1) res = combine(tree[l++], res);
    if (r & 1) res = combine(tree[--r], res);
  }
  return res;
}
bool check(int mid, const vector<pair<long long, long long> > &vp) {
  if (mid > m) return true;
  for (int i = 0; i < n; i++) tree[i + n] = {pass[vp[i].second], vp[i].second};
  bfst();
  int cost = 0;
  for (int i = 0; i < m; i += mid) {
    pair<long long, long long> p = {bug[i].first, 0};
    auto it = lower_bound(vp.begin(), vp.end(), p);
    if (it == vp.end()) return false;
    int id = it - vp.begin();
    p = qfst(id, n);
    modify(pos[p.second], 1e9 + 1);
    cost += p.first;
    if (cost > s) return false;
  }
  return true;
}
void solveforthiscase(const int &test) {
  cin >> n >> m >> s;
  bug.resize(m);
  for (int i = 0; i < m; i++) cin >> bug[i].first, bug[i].second = i;
  sort(bug.begin(), bug.end(), greater<pair<long long, long long> >());
  vector<pair<long long, long long> > vp(n);
  for (int i = 0; i < n; i++) cin >> vp[i].first, vp[i].second = i;
  for (int i = 0; i < n; i++) cin >> pass[i];
  sort(vp.begin(), vp.end());
  int l = 1, r = m + 1, mid, ans[m];
  for (int i = 0; i < n; i++) pos[vp[i].second] = i;
  while (l <= r) {
    mid = (l + r) >> 1;
    if (check(mid, vp))
      r = mid - 1;
    else
      l = mid + 1;
  }
  if (l > m) {
    cout << "NO\n";
    return;
  }
  cout << "YES\n";
  for (int i = 0; i < n; i++) tree[i + n] = {pass[vp[i].second], vp[i].second};
  bfst();
  for (int i = 0; i < m; i += l) {
    pair<long long, long long> p = {bug[i].first, 0};
    auto it = lower_bound(vp.begin(), vp.end(), p);
    int id = it - vp.begin();
    p = qfst(id, n);
    modify(pos[p.second], 1e9 + 1);
    for (int j = i; j < min(i + l, m); j++) ans[bug[j].second] = p.second;
  }
  for (int i = 0; i < m; i++) cout << ans[i] + 1 << ' ';
  return;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  clock_t start, end;
  start = clock();
  int test = 1;
  for (int i = 1; i <= test; i++) solveforthiscase(i);
  end = clock();
  long double t_t = (long double)(end - start) / (long double)(CLOCKS_PER_SEC);
  if (false) cerr << (long double)t_t * 1000 << " ms ";
}
