Statistical significance of overlapping genomic regions


I am a newbi and I am having following problem in biostats.

I have two data sets containing n number of genomic regions.

Set A has 23706 genomic coordinates and Set B has 14557 genomic coordinates. An overlap of this dataset gives 10752 genomic coordinates to be common to both, I want to know what is the statistical significance of this overlap.

I was suggested to apply hypergeometric test in R but unfortunately I am unable format an input for it. Could anyone help me.

Thank you in advance.