front and back dp(334,645の該当)