A program to check valid ip