A sandwich shop offers a a 48-inch long sandwich and a 40-inch long sandwich. The owner wants to cut the sandwich into servings so that all servings have an equal length and neither sandwich has any leftovers. What is the greatest possible length each serving can be with no leftovers from either sandwich?