Distinguish and control the multi-level resistive switching for ferroelectric layer and interface in a YMnO3/Nb:SrTiO3 device