#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; int S = 0; 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; bool flg = true; for(int x = col + 1; x < N; x++){ if(C[rank][x] != 0){ flg = false; break; } } if(flg) S |= 1 << pivot; 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++; } vector a = {0, 3}, b = {1, 2}; for(auto v0 : a){ for(auto v1 : b){ if((S >> v0 & 1) && (S >> v1 & 1)){ cout << "No\n"; return 0; } } } cout << "Yes\n"; }