Under Kansas law , it is illegal for children under the age of 16 to have sexual relations .