#ABC144E. 暴食 / Gluttony

暴食 / Gluttony

Source: AtCoder ABC144 E - Gluttony

Statement

There are N members and N foods. Member i has coefficient A_i, and food i has difficulty F_i. Each food is assigned to one distinct member. If a member with coefficient x eats a food with difficulty y, the time is x*y.

Before the contest, at most K total training sessions may be used. One session decreases one member's coefficient by 1, never below 0.

Choose the training and assignment to minimize the maximum eating time among all members.

Input

N K
A_1 A_2 ... A_N
F_1 F_2 ... F_N

Output

Print the minimum possible maximum time.

Constraints

  • 1 <= N <= 2 * 10^5
  • 0 <= K <= 10^18
  • 1 <= A_i,F_i <= 10^6
3 5
4 2 1
2 3 1
2