#include #include using namespace std; using ll = long long; using mint = atcoder::modint1000000007; int main(){ ios::sync_with_stdio(false); cin.tie(0); array,2> A, B; int v; for(int y = 0; y < 2; y++){ for(int x = 0; x < 2; x++){ cin >> v; A[y][x] = v; } } for(int y = 0; y < 2; y++){ for(int x = 0; x < 2; x++){ cin >> v; B[y][x] = v; } } vector> C = { {A[0][0] - B[0][0], A[1][0], -B[0][1], 0}, {A[0][1], A[1][1] - B[0][0], 0, -B[0][1]}, {-B[1][0], 0, A[0][0] - B[1][1], A[1][0]}, {0, -B[1][0], A[0][1], A[1][1] - B[1][1]}, }; int rank = 0; constexpr int N = 4; for(int col = 0; col < N; col++){ int pivot = -1; for(int y = rank; y < N; y++){ if(C[y][col] != 0){ pivot = y; break; } } if(pivot == -1) continue; swap(C[rank], C[pivot]); mint div = C[rank][col].inv(); for(int x = col; x < N; x++) C[rank][x] *= div; for(int y = 0; y < N; y++){ if(y == rank || C[y][rank] == 0) continue; mint coef = C[y][rank]; for(int x = col; x < N; x++){ C[y][x] -= coef * C[rank][x]; } } rank++; } int res = 0; for(int y = 0; y < rank; y++){ if(accumulate(C[y].begin(), C[y].end(), mint(0)) != 1){ res++; } } if(res >= 2){ cout << "Yes\n"; }else{ cout << "No\n"; } }