PMSI vs Perfection

Hi all, If you have a security interest perfected on day 2 and PMSI perfected on day 4, which one has priority? Thanks