Check if given four points form a square
Given coordinates of four points in a plane, find if the four points form a square or not. Examples: Input: p1 = { 20, 10 }, p2 = { 10, 20 }, p3 = { 20, 20 }, p4 = { 10, 10 }Output: YesExplanation: Input: p1 = { 20, 20 }, p2 = { 10, 20 }, p3 = { 20, 20 }, p4 = { 10, 10 }Output: No To check for squar