#include <bits/stdc++.h>
using namespace std;
vector<pair<int, int> > a;
int n, m;
long long se;
struct student {
  int ind, ab, c;
};
vector<student> b;
bool check(int x) {
  int i = m - 1, j = n - 1;
  long long tc = 0;
  multiset<int> s;
  while (i >= 0) {
    int l = 0, r = n - 1;
    while (l != r) {
      int mid = (l + r) / 2;
      if (b[mid].ab >= a[i].first)
        r = mid;
      else
        l = mid + 1;
    }
    if (b[l].ab < a[i].first) return false;
    while (j >= l) {
      s.insert(b[j].c);
      j--;
    }
    if (s.size() == 0) return false;
    tc += (long long)*s.begin();
    s.erase(s.begin());
    i -= x;
  }
  if (tc <= se)
    return true;
  else
    return false;
}
bool compare(const student &a, const student &b) { return a.ab < b.ab; }
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int i, j;
  cin >> n >> m >> se;
  a.resize(m);
  for (i = 0; i < m; i++) {
    cin >> a[i].first;
    a[i].second = i;
  }
  b.resize(n);
  for (i = 0; i < n; i++) {
    cin >> b[i].ab;
    b[i].ind = i;
  }
  for (i = 0; i < n; i++) cin >> b[i].c;
  sort(a.begin(), a.end());
  sort(b.begin(), b.end(), compare);
  int l = 1, r = m + 1;
  while (l != r) {
    int mid = (l + r) / 2;
    if (check(mid))
      r = mid;
    else
      l = mid + 1;
  }
  if (l == m + 1)
    cout << "NO";
  else {
    vector<int> ans(m);
    cout << "YES\n";
    i = m - 1, j = n - 1;
    multiset<pair<int, int> > s;
    while (i >= 0) {
      int l1 = 0, r1 = n - 1;
      while (l1 != r1) {
        int mid = (l1 + r1) / 2;
        if (b[mid].ab >= a[i].first)
          r1 = mid;
        else
          l1 = mid + 1;
      }
      while (j >= l1) {
        s.insert(make_pair(b[j].c, b[j].ind));
        j--;
      }
      int k = 1;
      while (i >= 0 && k <= l) {
        ans[a[i].second] = s.begin()->second;
        k++;
        i--;
      }
      s.erase(s.begin());
    }
    for (i = 0; i < m; i++) cout << ans[i] + 1 << " ";
  }
}
