  We study the inverse problem of determining both the source of a wave and its
speed inside a medium from measurements of the solution of the wave equation on
the boundary. This problem arises in photoacoustic and thermoacoustic
tomography, and has important applications in medical imaging. We prove that if
the solutions of the wave equation with the source and sound speed $(f_1,c_1)$
and $(f_2,c_2)$ agree on the boundary of a bounded region $\Omega$, then
  \[ \int_{\Omega}(c_2^{-2}-c_1^{-2})\varphi dy=0,\] for every harmonic
function $\varphi \in C(\bar{\Omega})$, which holds without any knowledge of
the source. We also show that if the wave speed $c$ is known and only assumed
to be bounded then, under a natural admissibility assumption, the source of the
wave can be uniquely determined from boundary measurements.
