Two classes of permutation polynomials having the form (x2m+x +δ)s+x