#include <stdio.h>int cellule_ouverte(int n, int p) { //insérez votre code ici int porte = 0; long i = 1, j = 1; //* méthode fine, trop longue a trouver, ctb xD // Cette méthode a été déduite depuis l'observation de le graphique // des resultats sur [0;100] et [1;1000]. while( i <= p ) { if( ( p == i ) ) { porte = 1; } i += j += 2; } //*/ /* méthode bourine, trop longue, cmb ^^ for( i = 1; i <= p; i ++ ) { if( !( p % i ) ) { porte = ( porte ) ? 0 : 1; } } //*/ return porte;}int main(){ int n,p,res; scanf("%d%d", &n, &p); res = cellule_ouverte(n,p); printf("%d\n",res); return 0;}