Jane has 4 pets: a cat, a dog, a rabbit, and a parrot. The cat is 2 years older than the dog. The rabbit is 3 years younger than the cat. The parrot is 1 year older than the rabbit. If the dog is 5 years old, how old is each pet? Let's think step by step and output the final answer within \boxed{}.
user