DOM library for prime