prime check and unit disk point generation