Is it possible to install Discourse on a domain already in use on another hosting?

And if I use example.com for Flarum (for now) and www.example.com to try Discourse? :x