#include <bits/stdc++.h>
using namespace std;
struct qq {
  int skill, val, num;
};
const int oo = 1e5;
int t, n, m, s;
pair<int, int> a[100012];
qq v[100012];
int ans[100012];
bool check(int times) {
  long long money = 0;
  int tempres[100012];
  priority_queue<pair<int, int>, vector<pair<int, int> >,
                 greater<pair<int, int> > >
      q;
  int r1 = m, r2 = n;
  while (r1 > 0) {
    while (v[r2].skill >= a[r1].first && r2 >= 1) {
      q.push({v[r2].val, v[r2].num});
      r2--;
    }
    if (q.empty()) return 0;
    int kills = min(times, r1);
    int temp = r1;
    r1 -= kills;
    int x = q.top().first;
    int y = q.top().second;
    q.pop();
    money += 1ll * x;
    for (int i = r1; i <= temp; i++) {
      tempres[a[i].second] = y;
    }
  }
  if (money <= s) {
    for (int i = 1; i <= m; i++) {
      ans[i] = tempres[i];
    }
    return 1;
  }
  return 0;
}
bool cmp(qq l, qq r) { return l.skill < r.skill; }
void input() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> n >> m >> s;
  for (int i = 1; i <= m; i++) {
    cin >> a[i].first;
    a[i].second = i;
  }
  sort(a + 1, a + 1 + m);
  for (int i = 1; i <= n; i++) {
    cin >> v[i].skill;
    v[i].num = i;
  }
  for (int i = 1; i <= n; i++) {
    cin >> v[i].val;
  }
  sort(v + 1, v + 1 + n, cmp);
}
int main() {
  input();
  int l = 1, r = oo, res = -1;
  while (l <= r) {
    int mid = (l + r) / 2;
    if (check(mid)) {
      res = mid;
      r = mid - 1;
    } else {
      l = mid + 1;
    }
  }
  if (res == -1) {
    cout << "NO";
  } else {
    cout << "YES\n";
    for (int i = 1; i <= m; i++) {
      cout << ans[i] << " ";
    }
  }
  return 0;
}
