We don't actually do people's homework for them here.
Have a try, make a start, when you get stuck come back with a specific question and someone will help.
Open the file and read the file line by line (Look up BufferedReader).
Parse the line to get the integers (Look up Tokenization).
Close the file.
It's actually quite simple.