Find the number of ways to permute the elements of the set $\{1,2,3,4,5,6,7,8,9\}$ such that no two adjacent numbers are both even or both odd.

Let's think step by step and output the final answer within \boxed{}.
user