Update Perfect Square