Project Euler 229 - Four Representations Using Squares

Official link: https://projecteuler.net/problem=229

Note: I am not happy with my solution since it was brute force and took ~18 mins to run