https://www.acmicpc.net/problem/5086
using System;
class Program
{
static void Main() {
for(;;){
string[] s=Console.ReadLine().Split(' ');
int a=int.Parse(s[0]);
int b=int.Parse(s[1]);
if(a==0&&b==0) break;
if(a>=b&&a%b==0) Console.WriteLine("multiple");
else if(b>=a&&b%a==0) Console.WriteLine("factor");
else Console.WriteLine("neither");
}
}
}