Palo Alto is an unusual city because it is an endless coordinate line. It is also known for the office of Lyft Level 5.

Lyft has become so popular so that it is now used by all m taxi drivers in the city, who every day transport the rest of the city residents — n riders.

Each resident (including taxi drivers) of Palo-Alto lives in its unique location (there is no such pair of residents that their coordinates are the same).

The Lyft system is very clever: when a rider calls a taxi, his call does not go to all taxi drivers, but only to the one that is the closest to that person. If there are multiple ones with the same distance, then to taxi driver with a smaller coordinate is selected.

But one morning the taxi drivers wondered: how many riders are there that would call the given taxi driver if they were the first to order a taxi on that day? In other words, you need to find for each taxi driver i the number a_{i} — the number of riders that would call the i-th taxi driver when all drivers and riders are at their home?

The taxi driver can neither transport himself nor other taxi drivers.

Input

The first line contains two integers n and m (1 ≤ n,m ≤ 10^5) — number of riders and taxi drivers.

The second line contains n + m integers x_1, x_2, …, x_{n+m} (1 ≤ x_1 < x_2 < … < x_{n+m} ≤ 10^9), where x_i is the coordinate where the i-th resident lives. 

The third line contains n + m integers t_1, t_2, …, t_{n+m} (0 ≤ t_i ≤ 1). If t_i = 1, then the i-th resident is a taxi driver, otherwise t_i = 0.

It is guaranteed that the number of i such that t_i = 1 is equal to m.

Output

Print m integers a_1, a_2, …, a_{m}, where a_i is the answer for the i-th taxi driver. The taxi driver has the number i if among all the taxi drivers he lives in the i-th smallest coordinate (see examples for better understanding).

Examples

Input

3 1
1 2 3 10
0 0 1 0


Output

3 

Input

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


Output

2 1 

Input

1 4
2 4 6 10 15
1 1 1 1 0


Output

0 0 0 1 

Note

In the first example, we have only one taxi driver, which means an order from any of n riders will go to him.

In the second example, the first taxi driver lives at the point with the coordinate 2, and the second one lives at the point with the coordinate 6. Obviously, the nearest taxi driver to the rider who lives on the 3 coordinate is the first one, and to the rider who lives on the coordinate 5 is the second one. The rider who lives on the 4 coordinate has the same distance to the first and the second taxi drivers, but since the first taxi driver has a smaller coordinate, the call from this rider will go to the first taxi driver.

In the third example, we have one rider and the taxi driver nearest to him is the fourth one.
import java.io.*;
import java.math.*;
import java.security.KeyStore.Entry;
import java.util.*;
/* 
																yash jobanputra
																	DA-IICT
*/
public class yash {
	private static InputStream stream;
	private static byte[] buf = new byte[1024];
	private static int curChar;
	private static int numChars;
	private static SpaceCharFilter filter;
	private static PrintWriter pw;
	private static long mod = 1000000000 + 7;
	private static long mod1 = 1000000000 + 9;
	private static int MAX=1000001;
	private static int block;
	private static int[] cost;
	private static int times;
	private static boolean[] vis;
	private static void soln(){
		int n=ni();int m=ni();
		int tot=n+m;
		int[] c=nia(tot);int[] t=nia(tot);
		TreeSet<Integer> ct=new TreeSet<>();
		for(int i=0;i<tot;i++)
		{
			if(t[i]==1)
				ct.add(c[i]);
		}
		int min=ct.first();
		int max=ct.last();
		HashMap<Integer,Integer> h=new HashMap<>();
		for(int i=0;i<tot;i++)
		{
			if(t[i]==0)
			{
				if(c[i]<min)
				{
					if(!h.containsKey(min))
						h.put(min, 0);
					h.put(min, h.get(min)+1);
				}
				else if(c[i]>max)
				{
					if(!h.containsKey(max))
						h.put(max, 0);
					h.put(max, h.get(max)+1);
				}
				else
				{
					int ff=ct.floor(c[i]);
					int cc=ct.ceiling(c[i]);
					int d1=c[i]-ff;
					int d2=cc-c[i];
					if(d1<=d2)
					{
						if(!h.containsKey(ff))
							h.put(ff, 0);
						h.put(ff, h.get(ff)+1);
					}
					else
					{
						if(!h.containsKey(cc))
							h.put(cc, 0);
						h.put(cc, h.get(cc)+1);
					}
				}
			}
		}
		Iterator<Integer> i=ct.iterator();
		while(i.hasNext())
		{
			int p=i.next();
			if(h.containsKey(p))
			pw.print(h.get(p)+" ");
			else
				pw.print("0 ");
		}
	}	
	public static class segtree{ 
		static int[] tree=new int[10000000];
		static int[] lazy=new int[10000000];
		public static void initial()
		{
			Arrays.fill(lazy, 0);
		}
		public static void build(int[] arr,int node,int l,int r)
		{
			if(l==r)
			{
				tree[node]=arr[l];
			}
			else
			{
				int m=(l+r)/2;
				build(arr,(2*node)+1,l,m);
				build(arr,(2*node)+2,m+1,r);
				tree[node]=tree[2*node+1]+tree[(2*node)+2];
			}
		}
		public static void updater(int[] arr,int node,int l,int r,int s,int e,int val)
		{
			if(lazy[node]!=0)
			{
				tree[node]+=(r-l+1)*lazy[node];
				if(l!=r)
				{
					lazy[2*node+1]+=lazy[node];
					lazy[2*node+2]+=lazy[node];
				}
				lazy[node]=0;
			}
			if(s<=l && e>=r)
			{
				tree[node]+=(r-l+1)*val;
				if(l!=r)
				{
					lazy[2*node+1]+=val;
					lazy[2*node+2]+=val;
				}
			}
			else if(!(e<l || r<s))
			{
				int m=(l+r)/2;
				updater(arr,2*node+1,l,m,s,e,val);
				updater(arr,2*node+2,m+1,r,s,e,val);
				tree[node]=tree[2*node+1]+tree[2*node+2];
			}
		}
		public static void update(int[] arr,int node,int l,int r,int ind,int val)
		{
			if(l==r)
			{
				arr[ind]+=val;
				tree[node]+=val;
			}
			else
			{
				int m=(l+r)/2;
				if(l<=ind && ind<=m)
				{
					update(arr,(2*node+1),l,m,ind,val);
				}
				else
				{
					update(arr,(2*node+2),m+1,r,ind,val);
				}
				tree[node]=tree[2*node+1]+tree[2*node+2];
			}
		}
		public static int query(int node,int l,int r,int s,int e)
		{
			if(lazy[node]!=0)
			{
				tree[node]+=(r-l+1)*lazy[node];
				if(l!=r)
				{
					lazy[2*node+1]+=lazy[node];
					lazy[2*node+2]+=lazy[node];
				}
				lazy[node]=0;
			}
			if(e<l || r<s)
				return 0;
			if(s<=l && e>=r)
				return tree[node];
			int m=(l+r)/2;
			int p1=query((2*node+1),l,m,s,e);
			int p2=query((2*node+2),m+1,r,s,e);
			return (p1+p2);
		}
	}
	public static long f(int number) {
	      if (number <= 1) return 1;
	      else return number * f(number - 1);
	   }
	public static void dfs(ArrayList<Integer>[] gr,int v)
	{
		vis[v]=true;
		ArrayList<Integer> arr=gr[v];
		for(int i=0;i<arr.size();i++)
		{
			if(!vis[arr.get(i)])
			{
				times++;
				dfs(gr,arr.get(i));
			}	
		}
		
	}
	private static class Pair implements Comparable<Pair>{
		int v,i,k;Pair j;
		public Pair(int a,int b){
			v=a;
			i=b;
		}
		@Override
		public int compareTo(Pair arg0) {
			{
				return this.v-arg0.v;
			}
		}
	}
	private static long pow(long a, long b, long c) {
		if (b == 0)
			return 1;
		long p = pow(a, b / 2, c);
		p = (p * p) % c;
		return (b % 2 == 0) ? p : (a * p) % c;
	}
	private static long gcd(long n, long l) {
		if (l == 0)
			return n;
		return gcd(l, n % l);
	}
	private static int gcd(int n, int l) {
		if (l == 0)
			return n;
		return gcd(l, n % l);
	}
	private static long max(long a, long b) {
		if (a > b)
			return a;
		return b;
	}

	private static long min(long a, long b) {
		if (a < b)
			return a;
		return b;
	}

	public static void main(String[] args) throws Exception {
		new Thread(null,new Runnable(){
			@Override
			public void run() {
				/*try {
					InputReader(new FileInputStream("C:\\Users\\hardik\\Desktop\\C-small-1-attempt1.in"));
				} catch (FileNotFoundException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}*/
				InputReader(System.in);
				pw = new PrintWriter(System.out);
				/*try {
					pw=new PrintWriter(new FileOutputStream("C:\\Users\\hardik\\Desktop\\out.txt"));
				} catch (FileNotFoundException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}*/
				soln();
				pw.close();
			}
		},"1",1<<26).start();
	}

	public static void InputReader(InputStream stream1) {
		stream = stream1;
	}

	private static boolean isWhitespace(int c) {
		return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
	}

	private static boolean isEndOfLine(int c) {
		return c == '\n' || c == '\r' || c == -1;
	}

	private static int read() {
		if (numChars == -1)
			throw new InputMismatchException();
		if (curChar >= numChars) {
			curChar = 0;
			try {
				numChars = stream.read(buf);
			} catch (IOException e) {
				throw new InputMismatchException();
			}
			if (numChars <= 0)
				return -1;
		}
		return buf[curChar++];
	}

	private static int ni() {
		int c = read();
		while (isSpaceChar(c))
			c = read();
		int sgn = 1;
		if (c == '-') {
			sgn = -1;
			c = read();
		}
		int res = 0;
		do {
			if (c < '0' || c > '9')
				throw new InputMismatchException();
			res *= 10;
			res += c - '0';
			c = read();
		} while (!isSpaceChar(c));
		return res * sgn;
	}

	private static long nl() {
		int c = read();
		while (isSpaceChar(c))
			c = read();
		int sgn = 1;
		if (c == '-') {
			sgn = -1;
			c = read();
		}
		long res = 0;
		do {
			if (c < '0' || c > '9')
				throw new InputMismatchException();
			res *= 10;
			res += c - '0';
			c = read();
		} while (!isSpaceChar(c));
		return res * sgn;
	}
	private static double nd()
    {
        double ret = 0, div = 1;
        int 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 static String nextToken() {
		int c = read();
		while (isSpaceChar(c))
			c = read();
		StringBuilder res = new StringBuilder();
		do {
			res.appendCodePoint(c);
			c = read();
		} while (!isSpaceChar(c));
		return res.toString();
	}

	private static String nli() {
		int c = read();
		while (isSpaceChar(c))
			c = read();
		StringBuilder res = new StringBuilder();
		do {
			res.appendCodePoint(c);
			c = read();
		} while (!isEndOfLine(c));
		return res.toString();
	}
	
	private static int[] nia(int n) {
		int[] arr = new int[n];
		for (int i = 0; i < n; i++) {
			arr[i] = ni();
		}
		return arr;
	}

	private static long[] nla(int n) {
		long[] arr = new long[n];
		for (int i = 0; i < n; i++) {
			arr[i] = nl();
		}
		return arr;
	}

	private static void pa(int[] arr) {
		for (int i = 0; i < arr.length; i++) {
			pw.print(arr[i] + " ");
		}
		pw.println();
		return;
	}

	private static void pa(long[] arr) {
		for (int i = 0; i < arr.length; i++) {
			pw.print(arr[i] + " ");
		}
		pw.println();
		return;
	}

	private static boolean isSpaceChar(int c) {
		if (filter != null)
			return filter.isSpaceChar(c);
		return isWhitespace(c);
	}
	private static char nc() {
		int c = read();
		while (isSpaceChar(c))
			c = read();
		char c1=(char)c;
		while(!isSpaceChar(c))
			c=read();
		return c1;
	}
	public String ns() {
        int c = read();
        while (isSpaceChar(c))
            c = read();
        StringBuilder res = new StringBuilder();
        do {
            res.appendCodePoint(c);
            c = read();
        } while (!isSpaceChar(c));
        return res.toString();
    }
	private interface SpaceCharFilter {
		public boolean isSpaceChar(int ch);
	}
}