Two-body nonleptonic B decays in the standard model and beyond