Finds magic squares