Targeted Training for Math Word Problems with Large Language Models