EVO vs STI#493

EVO vs STI

1 second
256 megabytes
Medium

Two Mr. T's favorite racers — EVO Guy and STI Guy will compete in a rally championship.

racing tracks are available for the championship. Organizers have a perfect simulation environment, and thus already know in advance what each driver's result for each of the tracks would be — it would take e_i seconds for EVO Guy to complete one lap on the track , and s_i seconds for STI Guy, respectively.

After conducting all of the races, each racer's score is calculated as the total number of seconds he's taken on all of the tracks he's raced. The one with the smaller score wins the championship; if the scores are equal, a draw is declared.

Of course, organizers can not conduct more than one race on the same track, and they may choose not to conduct races on some of the tracks at all. However, they get money from sponsors for each race conducted, so they're interested in running as many races as possible.

Now organizers wonder if they wanted a certain racer to win the championship, what would be the largest number of races they could conduct? They are interested in both numbers, so they ask you to determine those — R_E, the largest number of races held with EVO Guy winning the championship, and R_S, the largest number of races held with STI Guy winning. If no matter what tracks are chosen, the racer can't win the championship, output instead of the respective number.

Input

The first line of input contains a single integer (3 \le n \le 2000) — the number of racing tracks available.

The second line contains integers e_1, e_2, \dots, e_n (1 \le e_i \le 7200) — the numbers of seconds it takes EVO Guy to complete the -th track.

The third line contains integers s_1, s_2, \dots, s_n (1 \le s_i \le 7200) — the numbers of seconds it takes STI Guy to complete the -th track.

Output

Output two integers R_E and R_S — the largest number of races held with EVO Guy, or STI Guy winning the championship, respectively, or if the respective racer can't win the championship, no matter which tracks are chosen.

Examples

Example 1

Loading
Loading

Example 2

Loading
Loading

Example 3

Loading
Loading

Note

In the first sample, organizers can hold races on tracks 1,3,4,5 and EVO Guy's score will be 12+11+13+15 = 51 while STI Guy's score would be 12+10+16+16 = 54, so EVO Guy wins with races held. At the same time, if they held races on tracks 1,2,3,5 then EVO Guy's score would be 12+13+11+15 = 51, while STI Guy's score would be 12+10+10+16 = 48 with him winning with races held.

If all races were held, scores would be 12+13+11+13+15=64 and 12+10+10+16+16=64 with no winner.

In the third sample, on any track, STI Guy takes a longer time to complete a lap than EVO Guy, so he can't win no matter what tracks are chosen.