Preheat oven to 450º Fahrenheit. Mix yams, apples, rosemary, 2 tablespoons oil, ½ teaspoon salt, and ¼ teaspoon pepper in a bowl. Spread yam mixture in a single layer on a baking sheet. Bake until potatoes are browned and tender, about 25 minutes, turning halfway through baking time.