Both collected intelligence for spy agencies in Taiwan, causing a serious threat to China's national security.