Find the number of ways to divide a convex $n$-sided polygon into $(n-2)$ triangles using non-intersecting diagonals.