https://www.acmicpc.net/problem/5086
import java.util.*;
fun main(args: Array<String>) {
val s=Scanner(System.`in`)
while(true){
var a=s.nextInt()
var b=s.nextInt()
if(a==0&&b==0) break
if(a>=b&&a%b==0) println("multiple")
else if(b>=a&&b%a==0) println("factor")
else println("neither")
}
}