Let $M$ and $N$ be smooth manifolds and $$f:M\times N\to \mathbb{R}$$ a map. Suppose that the maps $$M\to\mathbb{R},\quad p\mapsto f(p,q_0)$$ $$N\to\mathbb{R},\quad q\mapsto f(p_0,q)$$ are smooth for all $(p_0,q_0)\in M\times N$.
Is $f$ smooth?
Edit: What if $f$ is continuous?