Nonlinear resonances of water waves