closest pair in c