Intrinsic magnetic properties of R2Fe17CyNx compounds: (R=Y, Sm, Er, and Tm)