This message was posted on behalf of Intel Corporation
Thank you very much for taking the time to reach the Intel® Communities Team.
I understand you would like to have a recommendation of RAM for the system you are building. I will be more than glad to assist you further.
As per the Memory Compatibility chart of the MSI* Z370-A PRO, this RAM should work properly on the system (CMK16GX4M2B3000C15) nonetheless, you should take into consideration that the Intel® Core™ i5-8400 (Memory Specification section) will support up to 64GB of RAM at 2666MHz so it would be better to get a RAM that supports the frequency of the processor in order to avoid any type of damage for the system.
I hope this helps.