#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 5;
int n, m;
long long s;
long long c[MAXN];
pair<int, int> comp[MAXN];
pair<int, int> skill[MAXN];
vector<int> soln(MAXN);
bool check(int t) {
  priority_queue<int, vector<int>, std::greater<int>> pq;
  int srem = s;
  int dh = m / t + (m % t > 0 ? 1 : 0);
  int sptr = 0;
  int cptr = 0;
  for (int i = 0; i < dh; i++) {
    while (sptr < n and comp[cptr].first <= skill[sptr].first) {
      pq.push(c[skill[sptr].second]);
      sptr++;
    }
    if (pq.size() == 0) return false;
    srem -= pq.top();
    pq.pop();
    cptr += t;
    if (srem < 0) return false;
    if (cptr >= m) return true;
  }
  return true;
}
void writeSoln(int t) {
  priority_queue<pair<int, int>, vector<pair<int, int>>,
                 std::greater<pair<int, int>>>
      pq;
  int dh = m / t + (m % t > 0 ? 1 : 0);
  int sptr = 0;
  int cptr = 0;
  for (int i = 0; i < dh; i++) {
    while (sptr < n and comp[cptr].first <= skill[sptr].first) {
      pq.push(make_pair(c[skill[sptr].second], skill[sptr].second));
      sptr++;
    }
    pair<int, int> top = pq.top();
    pq.pop();
    for (int i = 0; i < t and cptr < m; i++, cptr++) {
      soln[comp[cptr].second] = top.second;
    }
    if (cptr >= m) return;
  }
}
int main() {
  cin >> n >> m >> s;
  for (int i = 0, co; i < m; i++) {
    cin >> co;
    comp[i] = make_pair(co, i);
  }
  for (int i = 0, sk; i < n; i++) {
    cin >> sk;
    skill[i] = make_pair(sk, i + 1);
  }
  for (int i = 1; i <= n; i++) cin >> c[i];
  sort(comp, comp + m, std::greater<pair<int, int>>());
  sort(skill, skill + n, std::greater<pair<int, int>>());
  int l = 0;
  if (!check(m)) {
    cout << "NO";
    return 0;
  }
  int h = m;
  while (h - l > 1) {
    int m = (h + l) / 2;
    if (check(m))
      h = m;
    else
      l = m;
  }
  writeSoln(h);
  cout << "YES\n";
  for (int i = 0; i < m; i++) {
    cout << soln[i] << " ";
  }
}
