Suppose $X$ is a smooth projective variety defined over a number field $K$, then the etale cohomology $H^i_{et}(X,\mathbb{Q}_\ell)$ defines a continuous representation of the absolute Galois group $\text{Gal}(\overline{K}/K)$. Suppose that for every good prime $\mathfrak{p}$ of $K$, the characteristic polynomial of the Frobenius $F_{\mathfrak{p}}$ factors into \begin{equation} P_{\mathfrak{p}}(T)=\text{Det}(1-F_{\mathfrak{p}}T)|_{H^i_{et}(X,\mathbb{Q}_\ell)}=f_{\mathfrak{p}}(T) \cdot g_{\mathfrak{p}}(T) \end{equation} where the factorization happens in the ring $\mathbb{Z}[T]$. To avoid trivial cases, let us assume $\text{Deg}\,f_{\mathfrak{p}}>0$ and $\text{Deg}\,g_{\mathfrak{p}}>0$.
Question: is $H^i_{et}(X,\mathbb{Q}_\ell)$ the direct sum of two Galois representations, i.e. $M_1 \oplus M_2$, such that the characteristic polynomial of the Frobenius acting on $M_1$ (resp. $M_2$) is $f_{\mathfrak{p}}$ (resp. $g_{\mathfrak{p}}$)?
P.S. I gather if $P_{\mathfrak{p}}(T)$ can be factored further into product of polynomials of lower degree, we should combine correct factors to give the right $f_{\mathfrak{p}}$ (resp. $g_{\mathfrak{p}}$).