#include<stdio.h>
#include <iostream>
#include <fstream>
using namespace std;
double ab(double v)
{
    if( v >= 0 ) return v;
    return -v;
}
int main(int argc, char *argv[])
{
	FILE *inn = fopen(argv[1], "r"), *o = fopen("./bbs/prob/1958/res2.txt", "w");
	FILE *in = fopen(argv[2], "r");
    int n, i, j, x, y, min;
    long double sol, sol2;
    fscanf(inn,"%Lf", &sol);
    fscanf(in,"%Lf",&sol2);
	fprintf(o, "%Lf %Lf", sol, sol2);
    if( ab(sol-sol2)/(sol+sol2) <= 0.00001 ) printf("1");
    else printf("0");
    return 0;
}



