#include <bits/stdc++.h>
using namespace std;
int n, m, s;
vector<pair<int, int> > a, b;
vector<int> c;
vector<int> ans(100001);
int first(int time) {
  int i = 0, j = 0;
  priority_queue<pair<int, int> > q;
  int total = s;
  while (j < m) {
    while (i < n && b[i].first >= a[j].first) {
      q.push(pair<int, int>(-c[b[i].second], b[i].second));
      i++;
    }
    int tm = time;
    if (q.empty()) return 0;
    total += q.top().first;
    while (tm > 0 && j < m) {
      ans[a[j].second] = q.top().second;
      tm--;
      j++;
    }
    q.pop();
  }
  if (j != m) return 0;
  if (total < 0) return 0;
  return 1;
}
int main() {
  ios ::sync_with_stdio(false);
  cin >> n >> m >> s;
  int tmp;
  for (int i = 0; i < m; ++i) {
    cin >> tmp;
    a.push_back(pair<int, int>(tmp, i));
  }
  sort(a.rbegin(), a.rend());
  for (int i = 0; i < n; ++i) {
    cin >> tmp;
    b.push_back(pair<int, int>(tmp, i));
  }
  sort(b.rbegin(), b.rend());
  for (int i = 0; i < n; ++i) {
    cin >> tmp;
    c.push_back(tmp);
  }
  int L = 1, R = m;
  while (L < R) {
    int mid = (L + R) >> 1;
    if (first(mid))
      R = mid;
    else
      L = mid + 1;
  }
  if (first(L)) {
    cout << "YES\n";
    for (int i = 0; i < m; ++i) cout << ans[i] + 1 << " ";
    cout << endl;
  } else
    cout << "NO\n";
  return 0;
}
