Problem: Soon there will be held the world's largest programming contest, but the testing system still has m bugs. The contest organizer, a well-known university, has no choice but to attract university students to fix all the bugs. The university has n students able to perform such work. The students realize that they are the only hope of the organizers, so they don't want to work for free: the i-th student wants to get ci 'passes' in his subjects (regardless of the volume of his work).

Bugs, like students, are not the same: every bug is characterized by complexity aj, and every student has the level of his abilities bi. Student i can fix a bug j only if the level of his abilities is not less than the complexity of the bug: bi ≥ aj, and he does it in one day. Otherwise, the bug will have to be fixed by another student. Of course, no student can work on a few bugs in one day. All bugs are not dependent on each other, so they can be corrected in any order, and different students can work simultaneously.

The university wants to fix all the bugs as quickly as possible, but giving the students the total of not more than s passes. Determine which students to use for that and come up with the schedule of work saying which student should fix which bug.

Input

The first line contains three space-separated integers: n, m and s (1 ≤ n, m ≤ 105, 0 ≤ s ≤ 109) — the number of students, the number of bugs in the system and the maximum number of passes the university is ready to give the students.

The next line contains m space-separated integers a1, a2, ..., am (1 ≤ ai ≤ 109) — the bugs' complexities.

The next line contains n space-separated integers b1, b2, ..., bn (1 ≤ bi ≤ 109) — the levels of the students' abilities.

The next line contains n space-separated integers c1, c2, ..., cn (0 ≤ ci ≤ 109) — the numbers of the passes the students want to get for their help.

Output

If the university can't correct all bugs print "NO".

Otherwise, on the first line print "YES", and on the next line print m space-separated integers: the i-th of these numbers should equal the number of the student who corrects the i-th bug in the optimal answer. The bugs should be corrected as quickly as possible (you must spend the minimum number of days), and the total given passes mustn't exceed s. If there are multiple optimal answers, you can output any of them.

Examples

Input

3 4 9
1 3 1 2
2 1 3
4 3 6


Output

YES
2 3 2 3


Input

3 4 10
2 3 1 2
2 1 3
4 3 6


Output

YES
1 3 1 3


Input

3 4 9
2 3 1 2
2 1 3
4 3 6


Output

YES
3 3 2 3


Input

3 4 5
1 3 1 2
2 1 3
5 3 6


Output

NO

Note

Consider the first sample.

The third student (with level 3) must fix the 2nd and 4th bugs (complexities 3 and 2 correspondingly) and the second student (with level 1) must fix the 1st and 3rd bugs (their complexity also equals 1). Fixing each bug takes one day for each student, so it takes 2 days to fix all bugs (the students can work in parallel).

The second student wants 3 passes for his assistance, the third student wants 6 passes. It meets the university's capabilities as it is ready to give at most 9 passes.

Solution (in JAVA):

Solution:
import java.util.*;
import java.io.*;

public class FixingBugs {
    public static void main(String[] args) throws IOException {
        BufferedReader rd = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter pw = new PrintWriter(System.out);
        StringTokenizer st = new StringTokenizer(rd.readLine());
        n = Integer.parseInt(st.nextToken());
        m = Integer.parseInt(st.nextToken());
        s = Integer.parseInt(st.nextToken());
        
        B = new Bug[m];
        st = new StringTokenizer(rd.readLine());
        for(int i=0; i<m; i++){
            B[i] = new Bug(Integer.parseInt(st.nextToken()), i);
        }
        Arrays.sort(B, Bug.compareBugs);
        
        S = new Student[n];
        a = new int[n];
        c = new int[n];
        st = new StringTokenizer(rd.readLine());
        for(int i=0; i<n; i++){
            a[i] = Integer.parseInt(st.nextToken());    
        }
        st = new StringTokenizer(rd.readLine());
        for(int i=0; i<n; i++){
            c[i] = Integer.parseInt(st.nextToken());    
        }
        int days = binSearch(1, 100000);
    //  System.out.println(days);
        if(days==-1){
            System.out.println("NO");
            return;
        }
        pw.println("YES");
        solveForDays(days, pw);
    }
    
    static void solveForDays(int days, PrintWriter pw){
        for(int i=0; i<n; i++){
            S[i] = new Student(a[i], c[i], i+1);
        }
        Arrays.sort(S, Student.compareStudentAbilities);
        
        int current = n;
        
        PriorityQueue<Student> pq = new PriorityQueue<Student>(100, Student.compareStudentCosts);
        
        for(int i=m-1; i>=0; i--){
            int bugCompl = B[i].compl;
            int min = current;
            for(int j=current-1; j>=0; j--){
                if(S[j].ability >= bugCompl){
                    pq.add(S[j]);
            //      System.out.println(i+" added "+S[j].index+" "+S[j].ability+" "+S[j].cost);
                    min = j;
                }
                else{
                    break;
                }
            }
            
            Student stud = pq.poll();
        //  System.out.println("popped "+stud.index+" "+stud.ability+" "+stud.cost);
            
            for(int j=i; j>=i-days+1; j--){
                if(j<0) break;
                B[j].solver = stud.index;
            }
            
            current = min;
            i -= days;
            i++;
        }
        
        
        int[] array = new int[m];
        for(int i=0; i<m; i++){
            array[B[i].index] = B[i].solver;
        }
        for(int i=0; i<m; i++){
            pw.print(array[i]+" ");
        }
        pw.println();
        pw.flush();
        pw.close();
    }
    
    static boolean canDo1(int days){
        for(int i=0; i<n; i++){
            S[i] = new Student(a[i], c[i], i);
        }
        Arrays.sort(S, Student.compareStudentAbilities);
        
        long cost = 0;
        int current = n;
        
        PriorityQueue<Student> pq = new PriorityQueue<Student>(100, Student.compareStudentCosts);
        
        for(int i=m-1; i>=0; i--){
            int bugCompl = B[i].compl;
            int min = current;
            for(int j=current-1; j>=0; j--){
                if(S[j].ability >= bugCompl){
                    pq.add(S[j]);
                    min = j;
                }
                else{
                    break;
                }
            }
            current = min;
            
            if(pq.isEmpty()) return false;
            Student stud = pq.poll();
            cost += stud.cost;
            i -= days;
            i++;
        }
        return cost <= s;
    }
    
    static int binSearch(int L, int R){
        if(L==R) return canDo1(L) ? L : -1;
        if(R==L+1) return canDo1(L) ? L : (canDo1(R) ? R : -1);
        int M = (L+R)>>1;
        return canDo1(M) ? binSearch(L, M) : binSearch(M+1, R);
    }
    
    static boolean canDo(int days){
        for(int i=0; i<n; i++){
            S[i] = new Student(a[i], c[i], i);
        }
        Arrays.sort(S, Student.compareStudentAbilities);
        
        build(1, 0, n-1);
        
        long cost = 0;
        for(int i=m-1; i>=0; i--){
            int bugCompl = B[i].compl;
            int minIndex = bin(0, n-1, bugCompl);
            if(minIndex==-1)
                return false;
            
            int getMinCost = getMinIndex(1, 0, n-1, minIndex, n-1);
            if(S[getMinCost].cost==INF)
                return false;
            
            cost += S[getMinCost].cost;
            i -= days;
            i++;
            S[getMinCost].cost = INF;
            update(1, 0, n-1, getMinCost, INF);
        }
        return cost <= s;
    }
    
    static void update(int v, int l, int r, int index, int value){
        if(l==r){
            T[v] = index;
            return;
        }
        int m = (l+r)>>1;
        if(index<=m) update(2*v, l, m, index, value);
        else update(2*v+1, m+1, r, index, value);
        int fir = T[2*v], sec = T[2*v+1];
        int c1 = S[fir].cost, c2 = S[sec].cost;
        T[v] = (c1<=c2 ? fir : sec);
    }
    
    static int getMinIndex(int v, int l, int r, int a, int b){
        if(l==a && r==b){
            return T[v];
        }
        int m = (l+r)>>1;
        if(b<=m) return getMinIndex(2*v, l, m, a, b);
        if(a>m) return getMinIndex(2*v+1, m+1, r, a, b);
        int ind1 = getMinIndex(2*v, l, m, a, m), ind2 = getMinIndex(2*v+1, m+1, r, m+1, b);
        int fir = S[ind1].cost, sec = S[ind2].cost; 
        return fir<=sec ? ind1 : ind2;
    }
    
    static int bin(int l, int r, int val){
        if(l==r){
            return S[l].ability >= val ? l : -1;
        }
        if(r==l+1){
            return S[l].ability >= val ? l: (S[r].ability >= r ? r : -1);
        }
        int m = (l+r)>>1;
        return S[m].ability >= val ? bin(l, m, val) : bin(m+1, r, val);
    }
    
    static void build(int v, int l, int r){
        if(l==r){
            T[v] = l;
            return;
        }
        int m = (l+r)>>1;
        build(2*v, l, m);
        build(2*v+1, m+1, r);
        int a = S[T[2*v]].ability, b = S[T[2*v+1]].ability;
        T[v] = (a<=b ? T[2*v] : T[2*v+1]);
    }
    
    static int[] T = new int[500000];
    
    static Bug[] B;
    
    static Student[] S;
    
    static int[] a, c;
    
    static int n, m, s;
    
    static final int INF = 1500000000;
    
}

class Student{
    public int ability, cost, index;
    
    public Student(int a, int c, int index){
        ability = a;
        cost = c;
        this.index = index;
    }
    
    public static Comparator<Student> compareStudentCosts = new Comparator<Student>() {
        
        @Override
        public int compare(Student o1, Student o2) {
            return o1.cost!=o2.cost ? o1.cost - o2.cost : o1.index - o2.index;
        }
    };
        
    public static Comparator<Student> compareStudentAbilities = new Comparator<Student>() {
        
        @Override
        public int compare(Student arg0, Student arg1) {
            if(arg0.ability != arg1.ability) return arg0.ability - arg1.ability;
            return arg0.index - arg1.index;
        }
    };
    
}

class Bug{
    public int index, compl, solver;
    
    public Bug(int compl, int index){
        this.compl = compl;
        this.index = index;
    }
    
    public static Comparator<Bug> compareBugs = new Comparator<Bug>() {
        
        @Override
        public int compare(Bug o1, Bug o2) {
            return o1.compl!=o2.compl ? o1.compl - o2.compl : o1.index - o2.index;
        }
    };
    
}