Nonperturbative determination of β functions for SU(3) gauge theories with 10 and 12 fundamental flavors using domain wall fermions