A variational approach to noncooperative elliptic systems