Help me in solving FFL problem it is giving runtime error why is that so

My issue

My code

/* package codechef; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
class Codechef
{
	public static void main (String[] args) throws java.lang.Exception
	{
		Scanner sc=new Scanner(System.in);
	    int t=sc.nextInt();
	    while(t-->0) {
	        int n=sc.nextInt();
	        int s=sc.nextInt();
	       
	        int p[]=new int[n];
	        int a[]= new int[n];
	        for(int i=0;i<n;i++) {
	            p[i]=sc.nextInt();
	        }
	        for(int i=0;i<n;i++ ){
	            a[i]=sc.nextInt();
	            
	        }
	        int left=100-s;
	        ArrayList<Integer> l= new ArrayList<>();
	        ArrayList<Integer> l1= new ArrayList<>();
	        for(int i=0;i<n;i++) {
	            if(a[i]==1) {
	                l1.add(p[i]);
	            }
	            else {
	                l.add(p[i]);
	            }
	        }
	        int m=Collections.min(l);
	        int r=Collections.min(l1);
	        if((m+r)<=left) {
	            System.out.println("yes");
	        }
	        else {
	            System.out.println("no");
	        }
	        
	    } 
	}
}

Problem Link: FFL Problem - CodeChef