Both just need to have the same name in Max and Unreal. When you import the model in Unreal after you've exported it, just make sure you've fully loaded your package containing your materials or Unreal will not find them.
I beg to differ, if the name of the Materials are not the same as those exported from Max, then Unreal will assign a "None" material to them and you will have to manually assign them to the mesh. (Unless that is a "feature" our software engineers implemented in our Unreal build, but I don't think so.)
What Marcan said, but you don't need to worry about names; just make sure both materials are actually applied to the mesh as that's all unreal really looks for.