public static void main(String[] args) throws Exception{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer(br.readLine());
        n = Integer.parseInt(st.nextToken());
        m = Integer.parseInt(st.nextToken());
        s = Long.parseLong(st.nextToken());

        students = new Student[n];
        bugs = new Bug[m];
        st = new StringTokenizer(br.readLine());
        for(int i=0; i<m; i++){
            bugs[i] = new Bug(i, Integer.parseInt(st.nextToken()));
        }
        st = new StringTokenizer(br.readLine());
        StringTokenizer st2 = new StringTokenizer(br.readLine());
        for(int i=0; i<n; i++){
            students[i] = new Student(i, Integer.parseInt(st.nextToken()), Integer.parseInt(st2.nextToken()));
        }

        Arrays.sort(bugs, new Comparator<Bug>() {
            @Override
            public int compare(Bug bug, Bug bug2) {
                return bug2.complexity - bug.complexity;
            }
        });
        Arrays.sort(students, new Comparator<Student>() {
            @Override
            public int compare(Student student, Student student2) {
                return student2.power - student.power;
            }
        });

        int l=1, r=m;
        while(l<r){
            int mid = (r-l)/2+l;
            if(valid(mid, false)) r=mid; else l=mid+1;
        }
        if(valid(l, true)){
            System.out.println("YES");
            int pos = 0;
            int[] result = new int[m];
            for(int i=0; i<candidates.size(); i++){
                for(int j=pos; j<Math.min(pos+l, m); j++){
                    result[bugs[j].index] = candidates.get(i).index+1;
                }
                pos+=l;
            }
            for(int i=0; i<m; i++){
                if(i==m-1) System.out.println(result[i]); else System.out.print(result[i]+" ");
            }
        } else{
            System.out.println("NO");
        }
    }