Adaptive relay selection based on channel gain and link distance for cooperative out-band device-to-device networks