For this Question: Saurabh has a paper of size N*M and some horizontal and vertical lines in the form of arrays. Saurabh wants to know the maximum area which is trapped inside the lines.

Note:- Consider the boundary of the paper to be vertical and horizontal lines. Also consider 0 indexingThe first line of input contains 4 space separated integers depicting N, M, size of array contains horizontal lines(H), size of array containing vertical lines(V). The second line contains H space separated integers depicting horizontal lines. Last lines contains V space separated integers depicting vertical lines.

Constraints:-
1 <= N, M <= 10<sup>9</sup>
1 <= H, V <= 100000
0 <= horizontal lines <= N
0 <= vertical lines <= MPrint the maximum area trapped between the lines.
<b>Note:</b>Area to be printed might be large print area as (area%(10<sup>9</sup> +7)).Sample Input:-
5 4 3 2
1 2 4
1 3

Sample Output:-
4

Explanation:-
The area is- (2,1), (2,3) (4,1) (4,3)

Sample Input:-
5 4 2 1
3 1
1

Sample Output:-
6, I have written this Solution Code: import java.io.*;
import java.util.*;
class Main {
	public static void main (String[] args)
    {
		Scanner scn = new Scanner(System.in);
            int n = scn.nextInt();
            int m = scn.nextInt();
			int h = scn.nextInt();
            int w = scn.nextInt();
			int harr[] = new int[h];
            int warr[] = new int[w];
			for(int i=0; i<h; i++)
			{
				harr[i] = scn.nextInt();
			}
            for(int i=0; i<w; i++)
			{
				warr[i] = scn.nextInt();
			}
           System.out.println(maxArea( n,  m, harr, warr));
	}
     public static int maxArea(int n, int m, int[] hc, int[] vc) {
        Arrays.sort(hc);
        Arrays.sort(vc);
        int maxh = Math.max(hc[0], n - hc[hc.length-1]),
            maxv = Math.max(vc[0], m - vc[vc.length-1]);
        for (int i = 1; i < hc.length; i++)
            maxh = Math.max(maxh, hc[i] - hc[i-1]);
        for (int i = 1; i < vc.length; i++)
            maxv = Math.max(maxv, vc[i] - vc[i-1]);
        return (int)((long)maxh * maxv % 1000000007);
    }
}, In this Programming Language: Java, Now tell me if this Code is compilable or not?