A compound of Formula (I) or a pharmaceutically acceptable salt thereof, wherein X is selected from the group consisting of a bond, -O-, -S-, and -NR 4 -; Y is selected from the group consisting of wherein "*" represents the end of the Y group attached to the aminopyrazolopyrimidine ring; R 1 and R 2 are independently selected from the group consisting of hydrogen, C 1 -C 6 alkyl, C 1 -C 6 alkoxy, halo, nitro, hydroxy, cyano and amino, wherein C 1 -C 6 alkyl and C 1 -C 6 alkoxy are optionally substituted with one or more substituents independently selected from the group consisting of halo, nitro, hydroxy, cyano and amino; or R 1 and R 2 are taken together to form R 3 is selected from the group consisting of C 1 -C 6 alkyl, C 1 -C 6 alkoxy, halo, nitro, hydroxy, cyano and amino, wherein C 1 -C 6 alkyl and C 1 -C 6 alkoxy are optionally substituted with one or more substituents independently selected from the group consisting of halo, nitro, hydroxy, cyano and amino; R 4 and R 5 are independently selected from the group consisting of hydrogen and C 1 -C 6 alkyl; m is selected from 0, 1, 2, 3, 4, 5 or 6; n is selected from 0, 1, 2, 3, 4, 5, 6 or 7; Cy is selected from the group consisting of a 6- to 10-membered aromatic ring, a 5- to 10-membered aromatic heterocycle, a 3- to 10-membered aliphatic heterocycle, and a 3- to 10-membered cycloalkyl ring, wherein the 6- to 10-membered aromatic ring, 5- to 10-membered aromatic heterocycle, 3- to 10-membered aliphatic heterocycle, or 3- to 10-membered cycloalkyl ring is optionally substituted with one or more substituents independently selected from the group consisting of C 1 -C 6 alkyl, C 1 -C 6 alkoxy, halo, nitro, hydroxy, cyano, and amino. X is selected from the group consisting of a bond, -O-, -S-, and -NR 4 -; Y is selected from the group consisting of wherein "*" represents the end of the Y group attached to the aminopyrazolopyrimidine ring; R 1 and R 2 are independently selected from the group consisting of hydrogen, C 1 -C 6 alkyl, C 1 -C 6 alkoxy, halo, nitro, hydroxy, cyano and amino, wherein C 1 -C 6 alkyl and C 1 -C 6 alkoxy are optionally substituted with one or more substituents independently selected from the group consisting of halo, nitro, hydroxy, cyano and amino; or R 1 and R 2 are taken together to form R 3 is selected from the group consisting of C 1 -C 6 alkyl, C 1 -C 6 alkoxy, halo, nitro, hydroxy, cyano and amino, wherein C 1 -C 6 alkyl and C 1 -C 6 alkoxy are optionally substituted with one or more substituents independently selected from the group consisting of halo, nitro, hydroxy, cyano and amino; R 4 and R 5 are independently selected from the group consisting of hydrogen and C 1 -C 6 alkyl; m is selected from 0, 1, 2, 3, 4, 5 or 6; n is selected from 0, 1, 2, 3, 4, 5, 6 or 7; Cy is selected from the group consisting of a 6- to 10-membered aromatic ring, a 5- to 10-membered aromatic heterocycle, a 3- to 10-membered aliphatic heterocycle, and a 3- to 10-membered cycloalkyl ring, wherein the 6- to 10-membered aromatic ring, 5- to 10-membered aromatic heterocycle, 3- to 10-membered aliphatic heterocycle, or 3- to 10-membered cycloalkyl ring is optionally substituted with one or more substituents independently selected from the group consisting of C 1 -C 6 alkyl, C 1 -C 6 alkoxy, halo, nitro, hydroxy, cyano, and amino. <EOS>