Becky is making a quilt using material cut in shapes of triangles and squares. She has 18 triangle pieces and 42 square pieces. She would like for each row in the quilt to have the same number of each

Becky is making a quilt using material cut in shapes of triangles and squares. She has 18 triangle pieces and 42 square pieces. She would like for each row in the quilt to have the same number of each shape. What is the greatest number of rows she can put together if she uses all of the triangle and square pieces?