Panicking

If I take a plan b 10 minutes after unprotected sex is the pill going to work?