Is it okay for a dog to eat cat food and vise versa?



I have a young cat and dog. And they keep eating each others food. The dog would rather eat the cat food, and the cat would rather eat the dog food. I have tried feeding them at differnt times, using a spray bottle with water, etc. I have been tempted to just feed dog food one day them cat food the new, so that I know they are getting some of each....