import java.util.Scanner import scala.util.control.Breaks object Main { val b = new Breaks def main(args: Array[String]): Unit = { val sc = new Scanner(System.in); var n = sc.nextInt b.breakable{ for( i <- 0 to n){ for(j <- 0 to n){ if(j != 1 && j + i == n){ println(j + " " + i) b.break() } } } } } }