class Program {
public static void main(String[] args) {
mainloop:
for (int i = 0; i < 5; i++) {
for (int j = 0; j < 4; j++) {
if (i * j > 7) {
System.out.println("break mainloop");
break mainloop;
}
System.out.println(i + " " + j);
}
}
}
}
/*
run:
0 0
0 1
0 2
0 3
1 0
1 1
1 2
1 3
2 0
2 1
2 2
2 3
3 0
3 1
3 2
break mainloop
*/