I am getting NZEC Error in my Code, Can some one tell me why?

import java.util.;
import java.io.
;

class shoeCodechef {
public static void main(String[] args) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int noOfTestCase = Integer.parseInt(br.readLine());

	while (noOfTestCase != 0) {
		int arr[] = new int[26];
		for (int i = 0; i < 26; i++) {
			arr[i] = 0;
		}

		String inputs = br.readLine();
		String inp[] = inputs.trim().split("\\s+");
		int noOfShoes = Integer.parseInt(inp[0]);
		int friends = Integer.parseInt(inp[1]);
		
		String shoePair = br.readLine();			


		for (int i = 0; i < noOfShoes; i++) {
			arr[(int)shoePair.charAt(i) - 97]++;
		}			

		if (noOfShoes % 2 != 0) {
			System.out.println("NO");
		} else if (checkFreq(arr) == false) {
			System.out.println("NO");
		} else if (checkPair(arr,friends) == false) {
			System.out.println("NO");
		} else {
			System.out.println("YES");
		}

		noOfTestCase--;
	}
}

public static boolean checkFreq(int arr[]) {
	for (int x : arr) {
		if (x % 2 != 0) {
			return false;
		}
	}
	return true;
}

public static boolean checkPair(int arr[],int friends) {
	for (int x : arr) {
		if ((x / 2) > friends) {
			return false;
		}
	}
	return true;
}

}