Length and width problem