For this Question: You are given a grid of dimensions N*N. When you blast a bomb at cell (i, j) all the cells of row i and column j get damaged. You have 5 bombs. Find the number of ways you can choose 5 cells to place these bombs in so that the maximum number of cells gets damaged.Input contains a single integer N.

Constraints 
5 <= N <= 100Output a single integer which is the number of ways you can choose 5 cells to place the bombs in so that maximum number of cells get damaged.Sample Input 1
5

Sample output 1
120

Sample Input 2
6

Sample Output 2
4320

Explanation:-
For test1:- 
for maximum blast:-
their are 5 ways to place bomb 1
their are 4 ways to place bomb 2
their are 3 ways to place bomb 3
their are 2 ways to place bomb 4
their is 1 way to place bomb 5
so total number of ways will be= 5*4*3*2*1 =120, I have written this Solution Code: import java.util.*;
class Main
{
    public static void main(String args[])
    {
        Scanner sc=new Scanner(System.in);
        long n;
        long r=5;
        n=sc.nextLong();
        long p = 1, k = 1;
        if (n - r < r) {
            r = n - r;
        }
        if (r != 0) {
            while (r > 0) {
                p *= n;
                k *= r;
                long m = gcd(p, k);
                p /= m;
                k /= m;

                n--;
                r--;
            }
        }
        else
        {
            p = 1;
        }
        long ans=p*p*120;
        System.out.println(ans);
    }
    static long gcd(long n1, long n2)
    {
        long gcd = 1;

        for (int i = 1; i <= n1 && i <= n2; ++i)
        {
            if (n1 % i == 0 && n2 % i == 0)
            {
                gcd = i;
            }
        }
        return gcd;
    }
}, In this Programming Language: Java, Now tell me if this Code is compilable or not?