fork download
  1. using static System.Console;
  2.  
  3. public class Program {
  4. public static void Main() {
  5. while (true) {
  6. if (!int.TryParse(ReadLine(), out var x)) return;
  7. if (!int.TryParse(ReadLine(), out var y)) return;
  8. if (x == 0 || y == 0) break;
  9. if (x > 0 && y > 0) WriteLine("primeiro");
  10. else if (x < 0 && y > 0) WriteLine("segundo");
  11. else if (x < 0 && y < 0) WriteLine("terceiro");
  12. else WriteLine("quarto");
  13. }
  14. }
  15. }
  16.  
  17. //https://pt.stackoverflow.com/q/568875/101
Success #stdin #stdout 0.02s 20464KB
stdin
1
1
1
-1
-1
1
-1
-1
0
1
stdout
primeiro
quarto
segundo
terceiro