#include <bits/stdc++.h>
using namespace std;
const int maxn = 105;
long long int n, ans;
long long int a[maxn], b[maxn], p[maxn];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int t;
  t = 1;
  while (t--) {
    int n, m;
    cin >> n >> m;
    for (long long int i = 1; i < (long long int)(n / 2 + 1); i++) {
      for (long long int j = 1; j < (long long int)(m + 1); j++) {
        cout << i << " " << j << '\n';
        cout << n + 1 - i << " " << m + 1 - j << '\n';
      }
    }
    if (n % 2) {
      for (long long int i = 0; i < (long long int)(m / 2); i++) {
        cout << n / 2 + 1 << " " << i + 1 << '\n';
        cout << n / 2 + 1 << " " << m + 1 - (i + 1) << '\n';
      }
      if (m % 2) cout << n / 2 + 1 << " " << m / 2 + 1 << '\n';
    }
  }
}
