Challenge Information

Title : Pythagoras
Difficulty : Easy
Solutions : 4
Maximum Score : 50
Completed by You: No
Description :

You are given an array of integers. Find a pythagorean triplet (x,y,z) that satisfies x2 + y2 = z2, if this condition is satisfied return true else return false.

Write a function solve that have the following parameter(s):
1.) arr = array of integers

Example
Input:
arr = [5, 2, 3, 1, 4]
Output:
The function will return,
YES

Explanation
x=4, y=3 and z=5 forms a pythagorean triplet.

Constraints

Judocode