\r\n" );
document.write( "First we find the number of distinguishable permutations of\r\n" );
document.write( "ARRANGEMENT. There are 2 A's, 2 R's, 2 E's, and 2 N's. So\r\n" );
document.write( "that's 

\r\n" );
document.write( "\r\n" );
document.write( "From that we must subtract the number of distinguishable \r\n" );
document.write( "permutations in which the A's, R's or both come together.\r\n" );
document.write( "\r\n" );
document.write( "We use the \"sieve\" formula: \r\n" );
document.write( "\r\n" );
document.write( "N(X or Y) = N(X) + N(Y) - N(X and Y)\r\n" );
document.write( "where N() means \"the number of elements of\". \r\n" );
document.write( "\r\n" );
document.write( "N(permutations with A's together OR R's together) =\r\n" );
document.write( "\r\n" );
document.write( "N(permutations with A's together) + \r\n" );
document.write( "\r\n" );
document.write( "N(permutations with R's together) -\r\n" );
document.write( "\r\n" );
document.write( "N(permutations with A's together AND R's together)\r\n" );
document.write( "\r\n" );
document.write( "-------\r\n" );
document.write( "Let's get this first: N(permutations with A's together)\r\n" );
document.write( "\r\n" );
document.write( "They are the distinguishable arrangements of these\r\n" );
document.write( "10 things:\r\n" );
document.write( "\r\n" );
document.write( "(AA),R,R,N,G,E,M,E,N,T\r\n" );
document.write( "\r\n" );
document.write( "There are 2 R's, 2 N's, 2 E's, but only one (AA)\r\n" );
document.write( "\r\n" );
document.write( "That's 

\r\n" );
document.write( "---\r\n" );
document.write( "Let's get this next: N(permutations with R's together)\r\n" );
document.write( "\r\n" );
document.write( "They are the distinguishable arrangements of these\r\n" );
document.write( "10 things:\r\n" );
document.write( "\r\n" );
document.write( "{A,A,(RR),N,G,E,M,E,N,T}\r\n" );
document.write( "\r\n" );
document.write( "That's also 

\r\n" );
document.write( "---\r\n" );
document.write( "Now we get: N(permutations with A's together AND R's together)\r\n" );
document.write( "\r\n" );
document.write( "They are the distinguishable arrangements of these\r\n" );
document.write( "9 things:\r\n" );
document.write( "\r\n" );
document.write( "(AA),(RR),N,G,E,M,E,N,T\r\n" );
document.write( "\r\n" );
document.write( "There are 2 N's, and 2 E's, but only one (AA) and one (RR)\r\n" );
document.write( "\r\n" );
document.write( "That's 

\r\n" );
document.write( "\r\n" );
document.write( "So the number we must subtract from the 2494800 is\r\n" );
document.write( "\r\n" );
document.write( "

\r\n" );
document.write( "\r\n" );
document.write( "So the final answer is\r\n" );
document.write( "\r\n" );
document.write( "

\r\n" );
document.write( "\r\n" );
document.write( "Edwin
\n" );
document.write( "