# fiber factors of affine schemes

Let $X,Y \neq \emptyset$ be sufficiently nice schemes over, say, a field $k$. Assume that $X \times_k Y$ is affine. Does it follow that $X$ and $Y$ are affine?

Perhaps this works with Serre's criterion.

-

I think running your argument in reverse works. Suppose, say, $X$ was not affine. Then there is a coherent sheaf $\mathcal{F}$ on $X$ with $H^1(X, \mathcal{F}) \neq 0$. Choose any coherent sheaf $\mathcal{G}$ on $Y$ with a nonzero global section (e.g. the structure sheaf). Then the Kunneth formula shows that $H^1(X \times_k Y, p_1^*(\mathcal{F}) \otimes p_2^*(\mathcal{G})) \neq 0$, so $X\times_k Y$ cannot be affine.