Tushar's favourite fruit is banana, and as a result he buys them daily from the fruit shop.Tushar also has many friends and on his way back from the fuitshop to his room, he may go across his friends rooms, but not all of his friends are good and some may try to take his bananas. hence he may stop at any of his "good" friends' room but has to go quickly across the corridors where his "bad" friends stay. These corridors thus have risks attached to them. Its Monday, and there is also a lab that Tushar has to attend. So Tushar wants to get to his room within T time or else he will miss his lab. He also wants to take a path that minimizes the total risk associated with it.
NOTE:- that time he spends at a good friends room is negligible.
INPUT:
The first line contains 2 integers N (3 <= N 100) and T (1 <= T <= 250), denoting the number of good friends and the total time he has before his lab starts.
Tushar starts from the room 1 and has to reach his room which is the Nth one.
Next there are N lines with N numbers in each line, separated by single spaces. All numbers are separated by a single space. The jth integer in the ith line represents the time taken to reach the jth room from the ith room.
Next there are another N lines with N numbers in each line. All numbers are separated by a single space. The jth integer in the ith line represents the risk involved in travelling to the jth room from the ith room.
OUTPUT:
output one line containing 2 integers separated by a single space.
The first integer denotes the minimum total risk to reach his room. The second integer denotes the minimum time required to reach his room at the minimum total risk.
If it is impossible to reach his room within time T (inclusive), just print "-1" (without quotes).