getting runtime exception in taking input perhaps

for this problem

i tried to take input using bufferedreader

BufferedReader read = new BufferedReader(new InputStreamReader(;
String s[] = read.readLine().split(" ");
System.out.println(new BigInteger(s[0]).add(new BigInteger(s[1])));	

and then using scanner

Scanner s = new Scanner(;
System.out.println("Result = "+ (s.nextBigInteger()).add(s.nextBigInteger()));

got runtime exception in bufferedreader case.
I tried to take input on my system for 10^100 and 10^100 it worked fine.

What can be the issue?