The disclosure relates to pyrimidine-2-amine compounds of formula (I) wherein the variables n, m, Y, R1, R2, R3, R4 and R5 are as disclosed in the specification, as isolated stereoisomers or mixtures thereof, or as pharmaceutically acceptable salts thereof; pharmaceutical compositions comprising the compounds of formula (I). These compounds and the pharmaceutical compositions are suitable in treating diseases or conditions associated with JAK2 activity, wherein the disease or condition is selected from the group comprising allergies; asthma; autoimmune diseases such as transplant rejection (e.g., kidney, heart, lung, liver, pancreas, skin; host versus graft reaction (HVGR), graft versus host reaction (GVHR) etc.), rheumatoid arthritis, and amyotrophic lateral sclerosis; T-cell mediated autoimmune diseases such as multiple sclerosis, psoriasis and Sjogren's syndrome; Type inflammatory diseases such as vascular inflammation (including vasculitis, arteritis, atherosclerosis and coronary artery disease); diseases of the central nervous system such as stroke; pulmonary diseases such as bronchitis obliteraus, primary pulmonary hypertension and pulmonary arterial hypertension, and solid, delayed Type IV hypersensitivity reactions; hematologic malignancies such as leukemia and lymphomas; and obesity.