#include #include using namespace std; #define fastcin {\ cin.tie(0);\ ios::sync_with_stdio(false);\ } bool check(int a, int b, int c) { if(a!=c&&((a>b&&c>b)||(a> a1 >> a2 >> a3; if(check(a1, a2, a3)) printf("INF\n"); else { int m = max(a1, a3)+1; int ans = 0; for(int i=2; i