Unraveled Knitters is an online group that knits items for nursing homes and shelters. For a recent campaign, they spent a total of 1072 hr knitting hats and scarves. Each hat takes 8 hr to knit and each scarf takes 12 hr to knit. If they donated 110 items, how many of each did they knit?