Pregnancy can occur when sperm comes into direct contact with the vagina, as the sperm can potentially travel through the cervix and into the uterus to fertilize an egg. However, the chances of pregnancy in the scenario you described are relatively low. Sperm require a more direct and efficient route to reach the egg, such as through intercourse or artificial insemination.
Nevertheless, it is important to remember that sperm can survive for a short period of time outside the body, so there is a very small possibility of pregnancy if any semen or sperm manages to make its way into the vaginal area. To minimize the risk of pregnancy and sexually transmitted infections (stis), it is advisable to use contraception, such as condoms or other reliable methods, during sexual activities.