Heat the oven to 350°F/175°C. To make the filling: mix the pistachio nuts, almonds, sugar and cinnamon.
Brush the baking dish with melted butter, then line the pan with a third of the phyllo sheets. Brush each sheet with butter, and press the dough into the comers and sides of the dish. Top with half of the nut filling. Repeat this process. Use the remai