The RAM modules among themselves are not a problem - the question is whether your mainboard supports these modules. The mainboard manufacturers publish lists of tested RAM modules. It's good that you selected modules with the same speed; otherwise the faster ones would be operated with the clock of the slower ones.