You can place this in your master page layout to register both libraries
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
CMS.GlobalHelper.ScriptHelper.RegisterJQuery(this.Page);
CMS.GlobalHelper.ScriptHelper.RegisterJQueryUI(this.Page, false); // don't load ui stylesheet
}
</script>