Unable to use Scanner for input

Getting Error:
Exception in thread “main” java.util.NoSuchElementException
at java.util.Scanner.throwFor(Scanner.java:862)
at java.util.Scanner.next(Scanner.java:1485)
at java.util.Scanner.nextInt(Scanner.java:2117)
at java.util.Scanner.nextInt(Scanner.java:2076)
at Main.main(Main.java:5)

hey @piyushabhiranjan30
Give custom input.
I see that you have got a correct answer in the question. Do you have any further doubts?