Jointly Optimal Placement and Power Allocation of Wireless Networks