North and South Korea have agreed to hold their first talks in more than two years next Tuesday, according to a South Korean spokesman.