class Solution {
public:
bool checkStraightLine(vector<vector<int>>& coordinates)
{
int x = coordinates[0][0], y = coordinates[0][1];
int chax = coordinates[1][0] -x , chay = coordinates[1][1] - y;
for(int i = 2;i<coordinates.size();i++)
{
if(chay * (coordinates[i][0] -x) != chax*(coordinates[i][1] - y))
return false;
}
return 1;
}
};