We give a test that can distinguish efficiently between product states of n quantum systems and states which are far from product. If applied to a state |ψ whose maximum overlap with a product state is 1 − , the test passes with probability 1 − Θ( ), regardless of n or the local dimensions of the individual systems. The test uses two copies of |ψ . We prove correctness of this test as a special case of a more general result regarding stability of maximum output purity of the depolarising channel.A key application of the test is to quantum Merlin-Arthur games with multiple Merlins, where we obtain several structural results that had been previously conjectured, including the fact that soundness amplification is possible and that two Merlins can simulate many Merlins: QMA(k) = QMA(2) for k ≥ 2. Building on a previous result of Aaronson et al, this implies that there is an efficient quantum algorithm to verify 3-SAT with constant soundness, given two unentangled proofs of e O( √ n) qubits. Among other consequences, this result implies complexity-theoretic obstructions to finding a polynomial-time algorithm to determine separability of mixed quantum states, even up to constant error, and also to proving "weak" variants of the additivity conjecture for quantum channels.Finally, our test can also be used to construct an efficient test for determining whether a unitary operator is a tensor product, which is a generalisation of classical linearity testing.