Help me in solving AVGGIFT problem

My issue

hint

My code

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

class Codechef
{
	public static void main (String[] args) throws java.lang.Exception
	{
		// your code goes here
		Scanner sc =new Scanner(System.in);
		int num = sc.nextInt();
		Set<Integer> setS= new Hashsets<>();
		
		for(i=0;i<N;i++){
		    setS.add(Scanner.nextInt());
		}
		int x= setS.nextInt();
		
		if(setS.contains(x)){
		    System.out.println("yes");
		}
		else{
		    System.out.println("no");
		}

	}
}

Problem Link: Average Gift Practice Coding Problem