For every integer $n$, let $a_n$ and $b_n$ be real numbers. Let function $f: I R \rightarrow I R$ be given by $f(x)=\left\{\begin{array}{ll}a_n+\sin \pi x, & \text { for } x \in[2 n, 2 n+1] \\ b_n+\cos \pi x, & \text { for } x \in(2 n-1,2 n)\end{array}\right.$, for all integers $n$.
If $f$ is continuous, then which of the following hold(s) for all $n$ ?