1. You are given an array of N distinct integers.
2. You have to find two pairs (a, b) and (c, d) in the array such that ab = cd , where a, b, c and d are distinct elements.
3. Note: ab = a*b and cd = c*d.
4. display is a utility function which displays an array, feel free to use it for debugging purposes.
5. main takes input from the users and creates the array.
6. This is a functional problem.
7. You have to complete the solve function. It takes as input an array. It should return 1 if such a pair is found, else should return -1.
8. Don't change the code of main and display.
Input Format
First line takes input N, the length of the first array. Second line takes input N space separated numbers representing the elements of first array. Input is handled for you.
Output Format
Found or Not Found Output is handled for you.
Constraints
1 <= N <= 30000
Notice
Try First, Check Solution later
1. You should first read the question and watch the question video.2. Think of a solution approach, then try and submit the question on editor tab.3. We strongly advise you to watch the solution video for prescribed approach.Example
Input
7 3 4 7 1 2 9 8
Output
Found