Should be OK. No harm really in trying. Memory is the same size too? Some motherboards are selective on the size per slot pairing (8G+16G vs. 8G+8G). If it doesn't work, try separating the RAM into different slot pairs if single chips are supported, and if that doesn't work check your BIOS as well and remove any XMP profiles and/or check the latency specs to make sure they match. If you have it, your MB manual will state all of this and what memory is compatible.
But, my guess it'll work - throw it in, and turn it on. Good luck.