#include<bits/stdc++.h>
using namespace std;

int bin_search(int a[],int n,int x){
    int k = 0;
    for(int b = n/2; b >= 1; b /= 2)
        while(k+b < n && a[k+b] <= x){ k += b; if(a[k] == x) return k;}
    
    if(a[k] == x)
        return k;
    return -1;
}


int main(){
    ios::sync_with_stdio(0);cin.tie(0);
    int q, n;
    cin >> n >> q;
    int A[n], b, minb, maxb, k, medijana, medind;
    for(int i = 0; i < n; i++) cin >> A[i];
    sort(A,A+n);
    medind = n/2;medijana = A[medind];
    for(int i = 0; i < q; i++){ 
        cin >> b;
        k = bin_search(A,n,b);
        if(k != -1){
            minb = k;maxb = k;
            while(minb-1 > -1 && A[minb-1] == b) minb--;
            while(maxb+1 < n && A[maxb+1] == b) maxb++;
            if(minb <= medind && medind <= maxb){ cout << 0 << "\n";continue;}
            if(minb > medind){cout << minb-(n-minb-1)-1 << "\n";continue;}
            if(maxb < medind){cout << (n-maxb-1)-maxb << "\n";continue;}
            continue;}
        k = lower_bound(A,A+n,b)-A;int pomn = n+1;
        cout << k << pomn <<":";
        int pommedind = pomn/2;
        if(k == pommedind){ cout << 1 << "\n";continue;}
        if(k > pommedind){cout << k-(n-k-1) << "\n";continue;}
        if(k < pommedind){cout << (n-k-1)-k+1 << "\n";continue;}
    }
    
    
    return 0;
}