Sharp Upper Bounds for Energy and Randic Energy