The application describes a series of substituted derivatives of pyrazolo [1,5-a] pyrimidine and pyrazolo [1,5-a] [1,3,5] triazine of formula (I) as defined in the present invention, which are selective inhibitors of the activity of phosphatidyl inositol-4- IIIβ kinase (PI4KIIIβ), useful for the treatment and / or prevention of various human diseases, including inflammatory, autoimmune and oncological disorders; viral diseases and malaria and organ and cell transplant rejection.В заявке описана серия замещенных производных пиразоло[1,5-a]пиримидина и пиразоло[1,5-a][1,3,5]триазина формулы (I), определенной в настоящем изобретении, являющихся селективными ингибиторами активности фосфатидилинозит-4-киназы IIIβ (PI4KIIIβ), полезных для лечения и/или предупреждения различных заболеваний человека, включая воспалительные, аутоиммунные и онкологические нарушения; вирусные заболевания и малярию и отторжение трансплантата органа и клеток.