Perfect square using table