In BerSoft n programmers work, the programmer i is characterized by a skill r_i.

A programmer a can be a mentor of a programmer b if and only if the skill of the programmer a is strictly greater than the skill of the programmer b (r_a > r_b) and programmers a and b are not in a quarrel.

You are given the skills of each programmers and a list of k pairs of the programmers, which are in a quarrel (pairs are unordered). For each programmer i, find the number of programmers, for which the programmer i can be a mentor.

Input

The first line contains two integers n and k (2 ≤ n ≤ 2 ⋅ 10^5, 0 ≤ k ≤ min(2 ⋅ 10^5, (n ⋅ (n - 1))/(2))) — total number of programmers and number of pairs of programmers which are in a quarrel.

The second line contains a sequence of integers r_1, r_2, ..., r_n (1 ≤ r_i ≤ 10^{9}), where r_i equals to the skill of the i-th programmer.

Each of the following k lines contains two distinct integers x, y (1 ≤ x, y ≤ n, x ≠ y) — pair of programmers in a quarrel. The pairs are unordered, it means that if x is in a quarrel with y then y is in a quarrel with x. Guaranteed, that for each pair (x, y) there are no other pairs (x, y) and (y, x) in the input.

Output

Print n integers, the i-th number should be equal to the number of programmers, for which the i-th programmer can be a mentor. Programmers are numbered in the same order that their skills are given in the input.

Examples

Input

4 2
10 4 10 15
1 2
4 3


Output

0 0 1 2 


Input

10 4
5 4 1 5 4 3 7 1 2 5
4 6
2 1
10 8
3 5


Output

5 4 0 5 3 3 9 0 2 5 

Note

In the first example, the first programmer can not be mentor of any other (because only the second programmer has a skill, lower than first programmer skill, but they are in a quarrel). The second programmer can not be mentor of any other programmer, because his skill is minimal among others. The third programmer can be a mentor of the second programmer. The fourth programmer can be a mentor of the first and of the second programmers. He can not be a mentor of the third programmer, because they are in a quarrel.
import java.util.*;
import java.io.*;

public class p6{
    static int ind = 0;
    public static void main(String args[]) throws IOException{
        // Scanner sc = new Scanner(System.in);
        Reader r = new Reader();
        long n = r.nextLong();
        long k = r.nextLong();
        ArrayList<pair> al = new ArrayList<>();
        HashMap<pair,ArrayList<pair>> hm = new HashMap<>();
        HashMap<Integer,pair> bp = new HashMap<>();
        int i = 1;
        while(i <= n){
            bp.put(i,new pair(i,r.nextInt()));
            al.add(bp.get(i));
            i++;
        }

        for(i =0;i<k;i++){
            pair a = bp.get(r.nextInt());
            pair b = bp.get(r.nextInt());

            if(!hm.containsKey(a))
                hm.put(a,new ArrayList<pair>());

            if(!hm.containsKey(b))
                hm.put(b,new ArrayList<pair>());

            if(a.j > b.j)
                hm.get(a).add(b);
            if(b.j > a.j)
                hm.get(b).add(a);

        }

        Collections.sort(al,new sortit());



        for(int x = 1;x<=n;x++){
            pair p = bp.get(x);
            ind = -1;
            BS(al,0,al.size()-1,p.j) ;
            ind++;
            int total = ind ;

            int size = 0;
            if(hm.get(p) != null)
                size = hm.get(p).size();
            int ans = total - size;

            p.ans = ans;
        }

        for(i = 1; i <= n;i++){
            System.out.print(bp.get(i).ans + " ");
        }

    }

    static void BS(ArrayList<pair> al, int l,int h,int val){
        if(l > h)
            return ;


        int mid = (l + h)/2;
        if(val == al.get(mid).j ) {
            ind = mid - 1;
            BS(al, l, mid - 1, val);
        }

        else if(val > al.get(mid).j ){
            BS(al,mid+1,h,val);
        }

        else {
            BS(al,l,mid-1,val);
        }
    }

}



class pair
{
    int i, j;
    int ans = 0;
    pair(int x, int y)
    {
        i = x;
        j = y;
    }
    public int hashCode()
    {
        //System.out.println("In hashcode");
        long hashcode = 0;
        hashcode = ((long)i*1000000000)%1000000007;
        hashcode += (long)j;
        return (int)hashcode%100000007;
    }
    public boolean equals(Object obj){
        //System.out.println("In equals");
        if (obj instanceof pair) {
            pair pp = (pair) obj;
            return (pp.i == this.i && pp.j == this.j);
        } else {
            return false;
        }
    }

}

class sortit implements Comparator<pair>{
    public int compare(pair a, pair b){
        return a.j - b.j;
    }
}



class Reader

{
    final private int BUFFER_SIZE = 1 << 16;
    private DataInputStream din;
    private byte[] buffer;
    private int bufferPointer, bytesRead;

    public Reader()
    {
        din = new DataInputStream(System.in);
        buffer = new byte[BUFFER_SIZE];
        bufferPointer = bytesRead = 0;
    }

    public Reader(String file_name) throws IOException
    {
        din = new DataInputStream(new FileInputStream(file_name));
        buffer = new byte[BUFFER_SIZE];
        bufferPointer = bytesRead = 0;
    }

    public String readLine() throws IOException
    {
        byte[] buf = new byte[64]; // line length
        int cnt = 0, c;
        while ((c = read()) != -1)
        {
            if (c == '\n')
                break;
            buf[cnt++] = (byte) c;
        }
        return new String(buf, 0, cnt);
    }

    public int nextInt() throws IOException
    {
        int ret = 0;
        byte c = read();
        while (c <= ' ')
            c = read();
        boolean neg = (c == '-');
        if (neg)
            c = read();
        do
        {
            ret = ret * 10 + c - '0';
        } while ((c = read()) >= '0' && c <= '9');

        if (neg)
            return -ret;
        return ret;
    }

    public long nextLong() throws IOException
    {
        long ret = 0;
        byte c = read();
        while (c <= ' ')
            c = read();
        boolean neg = (c == '-');
        if (neg)
            c = read();
        do {
            ret = ret * 10 + c - '0';
        }
        while ((c = read()) >= '0' && c <= '9');
        if (neg)
            return -ret;
        return ret;
    }

    public double nextDouble() throws IOException
    {
        double ret = 0, div = 1;
        byte c = read();
        while (c <= ' ')
            c = read();
        boolean neg = (c == '-');
        if (neg)
            c = read();

        do {
            ret = ret * 10 + c - '0';
        }
        while ((c = read()) >= '0' && c <= '9');

        if (c == '.')
        {
            while ((c = read()) >= '0' && c <= '9')
            {
                ret += (c - '0') / (div *= 10);
            }
        }

        if (neg)
            return -ret;
        return ret;
    }

    private void fillBuffer() throws IOException
    {
        bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
        if (bytesRead == -1)
            buffer[0] = -1;
    }

    private byte read() throws IOException
    {
        if (bufferPointer == bytesRead)
            fillBuffer();
        return buffer[bufferPointer++];
    }

    public void close() throws IOException
    {
        if (din == null)
            return;
        din.close();
    }
}

