def positive_int_input(prompt):
  n = int(raw_input(prompt))
  while n < 0:
    print "You cannot input a negative number!"
    n = int(raw_input(prompt))
  return n

def main():
  age = positive_int_input("How old are you? ")

  print "Next year, you will be %d." % (age+1)

  age = positive_int_input("How old is your dog? ")

  print "Next year, your dog will be %d." % (age+1)

main()

