Six friends, all keen mathematicians, met at a party. Each letter in their names - NED, PAT, ROD, RON, TIM and TOM - was replaced by a digit, with different digits used for different letters. In this way each of their names became a three-figure number. Whenever two of the friends were in conversation together, they calculated two things: a) the number of different primes that were factors of both their numbers; and b) the number of letters that occurred in both their names. For every pair of friends, their answer to both a and b was the same.  What number does PRINTED stand for?