Both must be met, and you must live in one household with your spouse. Time abroad of more than a fifth of the six years breaks the residence count.