Regularity of the free boundary for the two-phase Bernoulli problem