package mc;

/* JADX INFO: loaded from: classes.dex */
public final class v implements Comparable {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final int f30645a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final int f30646b;

    public v(int i10, int i11) {
        this.f30645a = i10;
        this.f30646b = i11;
    }

    public final v a(v vVar) {
        int i10 = vVar.f30646b;
        int i11 = this.f30645a;
        int i12 = i11 * i10;
        int i13 = vVar.f30645a;
        int i14 = this.f30646b;
        return i12 <= i13 * i14 ? new v(i13, (i14 * i13) / i11) : new v((i11 * i10) / i14, i10);
    }

    public final v b(v vVar) {
        int i10 = vVar.f30646b;
        int i11 = this.f30645a;
        int i12 = i11 * i10;
        int i13 = vVar.f30645a;
        int i14 = this.f30646b;
        return i12 >= i13 * i14 ? new v(i13, (i14 * i13) / i11) : new v((i11 * i10) / i14, i10);
    }

    @Override // java.lang.Comparable
    public final int compareTo(Object obj) {
        v vVar = (v) obj;
        int i10 = this.f30646b * this.f30645a;
        int i11 = vVar.f30646b * vVar.f30645a;
        if (i11 < i10) {
            return 1;
        }
        return i11 > i10 ? -1 : 0;
    }

    public final boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null || v.class != obj.getClass()) {
            return false;
        }
        v vVar = (v) obj;
        return this.f30645a == vVar.f30645a && this.f30646b == vVar.f30646b;
    }

    public final int hashCode() {
        return (this.f30645a * 31) + this.f30646b;
    }

    public final String toString() {
        return this.f30645a + "x" + this.f30646b;
    }
}
