Simultaneous electric and magnetic field induced nonvolatile memory