What do you mean by open loop gain margin? I only know about loop gain margin at certain frequency with given the closed loop gain and open loop gain plot. Loop gain is the log subtraction of the open loop gain minus close loop gain at a given frequency. People use that to calculate the error of the closed loop feedback.
Phase margin usually refer the the phase from 180 at the open loop gain line crossing the close loop gain line OR at the point loop gain equal to 0dB.
Yungman is right. I would add that the answer is "no". The gain and phase margins are two numbers specified or measured where the closed-loop gain is 1. You cannot deduce or infer the transfer function unless much more is known about the system.